Private GIT

Skip to content
Snippets Groups Projects
Commit 185f1355 authored by vx3r's avatar vx3r
Browse files

all docker images to alpine

parent 5cb19c36
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,9 @@ stages:
build-back:
stage: build
image: golang:latest
image: golang:alpine
script:
- GOOS=linux GOARCH=amd64 go build -o ${CI_PROJECT_NAME}-linux-amd64
- go build -o ${CI_PROJECT_NAME}-linux-amd64
artifacts:
paths:
- ${CI_PROJECT_NAME}-linux-amd64
......
FROM debian:stable-slim
FROM alpine
WORKDIR /app
......
FROM golang as build-back
WORKDIR /wg-gen-web
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 /ui
WORKDIR /app
ADD ui .
RUN npm install
RUN npm run build
FROM debian:stable-slim
FROM alpine
WORKDIR /app
COPY --from=build-back /wg-gen-web/wg-gen-web-linux-amd64 .
COPY --from=build-front /ui/dist ./ui/dist
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"]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment