mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +02:00
9d93f4092c
* Include building ui into docker file * Specify docker.io for image * removing old dist files * update gitignore to skip dist folders * adding build to arguments as the files are no longer in repo * remove bindfs to figure out the problem later * running all instead of just specified * removed bindfs action * disabling error check for now until we move building ui assets to action * added npm install & run to pull_request yaml * build ui folder * --prefix on install deps * --prefix on install deps * re-added not checking generated files Co-authored-by: Fredrik Grönqvist <fredrik.gronqvist@embark-studios.com>
23 lines
551 B
Docker
23 lines
551 B
Docker
FROM docker.io/node:12-alpine 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:1.13 AS build
|
|
WORKDIR /wg
|
|
RUN go get github.com/go-bindata/go-bindata/... &&\
|
|
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 &&\
|
|
go install .
|
|
|
|
FROM gcr.io/distroless/base
|
|
COPY --from=build /go/bin/wireguard-ui /
|
|
ENTRYPOINT [ "/wireguard-ui" ]
|