customer/Dockerfile
Pasha 582a3cea75
All checks were successful
Deploy / CreateImage (push) Successful in 2m18s
Deploy / DeployService (push) Successful in 25s
-
2025-01-07 17:10:34 +03:00

27 lines
564 B
Docker

# BUILD
FROM gitea.pena/penadevops/container-images/golang:main as build
# Update packages and clear cache
# Set work directory
WORKDIR /app
# Create binary directory
RUN mkdir /app/bin -p
ADD . .
# Download go depences
RUN go mod download
# Build app
RUN GOOS=linux go build -o bin ./...
# PRODUCTION
FROM gitea.pena/penadevops/container-images/alpine:main
# Install packages
RUN apk --no-cache add ca-certificates
# Create home directory
WORKDIR /app
# Copy build file
COPY --from=build /app/bin/app ./app
COPY ./report.docx ./report.docx
# CMD
CMD ["./app"]