0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-11-04 17:31:17 +00:00
wg-gen-web/Dockerfile
2020-02-06 15:07:15 +09:00

23 lines
460 B
Docker

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