mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +02:00
0cdaa2ae05
* bump golang-action to 1.7.0 * set action-gh-release to v1 * move away from distroless to alpine * bump alpine to latest to align with Dockerfile * making sure path is gopath is correct * separate cache directories per build-job * go mod tidy * update go dependencies
23 lines
529 B
Docker
23 lines
529 B
Docker
FROM docker.io/node:12 AS ui
|
|
WORKDIR /ui
|
|
COPY ui/package.json ui/package-lock.json /ui/
|
|
RUN npm install
|
|
COPY ui .
|
|
RUN npm run build
|
|
|
|
FROM docker.io/golang:latest AS build
|
|
WORKDIR /wg
|
|
RUN go get github.com/go-bindata/go-bindata/...
|
|
RUN go get github.com/elazarl/go-bindata-assetfs/...
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
COPY . .
|
|
COPY --from=ui /ui/dist ui/dist
|
|
RUN go-bindata-assetfs -prefix ui/dist ui/dist
|
|
RUN go install .
|
|
|
|
FROM alpine:latest
|
|
COPY --from=build /go/bin/wireguard-ui /
|
|
ENTRYPOINT [ "/wireguard-ui" ]
|