treasurer/Dockerfile
skeris f8425e7d54
Some checks failed
Deploy / CreateImage (push) Successful in 1m50s
Deploy / DeployService (push) Successful in 24s
Lint / Lint (push) Failing after 49s
ci: deployment rules
2025-01-03 01:25:37 +03:00

30 lines
620 B
Docker

# BUILD
FROM gitea.pena/penadevops/container-images/golang:main as build
# Update depences
RUN apk update && apk add --no-cache curl
# Create build directory
RUN mkdir /app/bin -p
# Set home directory
WORKDIR /app
# Copy go.mod
ADD go.mod go.sum /app/
# Download go depences
RUN go mod download
# Copy all local files
ADD . /app
# 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
# CMD
CMD ["./app"]