treasurer/Dockerfile
skeris 35a084dccc
All checks were successful
Deploy / CreateImage (push) Successful in 2m10s
Deploy / DeployService (push) Successful in 27s
fix: docker image tag
2025-06-14 14:24:05 +03:00

30 lines
629 B
Docker

# BUILD
FROM gitea.pena/penadevops/container-images/golang:1.23.8-alpine 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"]