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