fix Dockerfile
This commit is contained in:
parent
edb5e662d1
commit
3fe210bb18
@ -6,15 +6,13 @@ RUN apk add --no-cache curl
|
|||||||
# Set work directory
|
# Set work directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add git
|
RUN apk add git
|
||||||
# Create binary directory
|
|
||||||
RUN mkdir /app/bin -p
|
|
||||||
# Add main files to app
|
# Add main files to app
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
|
RUN git config --global url."https://buildToken:glpat-axA8ttckx3aPf_xd2Dym@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
|
||||||
# Download go depences
|
# Download go depences
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
# Build app
|
# Build app
|
||||||
RUN GOOS=linux go build -o bin ./...
|
RUN GOOS=linux go build -o bin ./cmd/main.go
|
||||||
|
|
||||||
# PRODUCTION
|
# PRODUCTION
|
||||||
FROM alpine:3.18.3 AS production
|
FROM alpine:3.18.3 AS production
|
||||||
|
Loading…
Reference in New Issue
Block a user