notifier/Dockerfile

27 lines
555 B
Docker
Raw Normal View History

2024-04-23 13:14:22 +00:00
# BUILD
2025-01-03 08:21:15 +00:00
FROM gitea.pena/penadevops/container-images/golang:main as build
2024-04-23 13:14:22 +00:00
# Update packages and clear cache
RUN apk add --no-cache curl
# Set work directory
WORKDIR /app
RUN apk add git
# Add main files to app
ADD . .
# Download go depences
RUN go mod download
# Build app
2024-04-27 18:49:18 +00:00
RUN GOOS=linux go build -o bin ./cmd/main.go
2024-04-23 13:14:22 +00:00
# PRODUCTION
2025-01-03 08:21:15 +00:00
FROM gitea.pena/penadevops/container-images/alpine:main
2024-04-23 13:14:22 +00:00
# Install packages
RUN apk --no-cache add ca-certificates
# Create home directory
WORKDIR /app
# Copy build file
COPY --from=build /app/bin ./app
# CMD
CMD ["./app"]