fix Dockerfile

This commit is contained in:
skeris 2024-04-27 21:49:18 +03:00
parent edb5e662d1
commit 3fe210bb18

@ -6,15 +6,13 @@ RUN apk add --no-cache curl
# Set work directory
WORKDIR /app
RUN apk add git
# Create binary directory
RUN mkdir /app/bin -p
# Add main files to app
ADD . .
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
# Download go depences
RUN go mod download
# Build app
RUN GOOS=linux go build -o bin ./...
RUN GOOS=linux go build -o bin ./cmd/main.go
# PRODUCTION
FROM alpine:3.18.3 AS production