mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2025-09-10 12:14:28 +00:00
DockerFile best practices
This commit is contained in:
@ -1,19 +1,21 @@
|
||||
FROM golang:alpine AS build-back
|
||||
WORKDIR /app
|
||||
ADD . .
|
||||
COPY . .
|
||||
RUN go build -o wg-gen-web-linux
|
||||
|
||||
FROM node:10-alpine AS build-front
|
||||
WORKDIR /app
|
||||
ADD ui .
|
||||
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
|
||||
ADD .env .
|
||||
COPY .env .
|
||||
RUN chmod +x ./wg-gen-web-linux
|
||||
RUN apk add --no-cache ca-certificates
|
||||
EXPOSE 8080
|
||||
|
Reference in New Issue
Block a user