0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-12-18 00:13:23 +00:00
wg-gen-web/Dockerfile.dev
2020-02-03 19:14:15 +09:00

21 lines
444 B
Docker

FROM golang:alpine AS build-back
WORKDIR /app
ADD . .
RUN go build -o wg-gen-web-linux-amd64
FROM node:10-alpine as build-front
WORKDIR /app
ADD ui .
RUN npm install
RUN npm run build
FROM alpine
WORKDIR /app
COPY --from=build-back /app/wg-gen-web-linux-amd64 .
COPY --from=build-front /app/dist ./ui/dist
ADD .env .
RUN chmod +x ./wg-gen-web-linux-amd64
RUN apk add --no-cache ca-certificates
EXPOSE 8080
CMD ["/app/wg-gen-web-linux-amd64"]