mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-09-10 12:14:28 +00:00
cd/cd docker build from Dockerfile
This commit is contained in:
25
Dockerfile
25
Dockerfile
@ -1,14 +1,21 @@
|
||||
FROM alpine
|
||||
|
||||
FROM golang:alpine AS build-back
|
||||
WORKDIR /app
|
||||
ADD . .
|
||||
RUN go build -o wg-gen-web-linux
|
||||
|
||||
ADD 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 .
|
||||
COPY --from=build-front /app/dist ./ui/dist
|
||||
ADD .env .
|
||||
ADD ui/dist ui/dist
|
||||
|
||||
RUN chmod +x ./wg-gen-web-linux-amd64
|
||||
RUN apk update && apk --no-cache add wget ca-certificates
|
||||
|
||||
RUN chmod +x ./wg-gen-web-linux
|
||||
RUN apk add --no-cache ca-certificates
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/app/wg-gen-web-linux-amd64"]
|
||||
CMD ["/app/wg-gen-web-linux"]
|
Reference in New Issue
Block a user