grafana-backuper/Dockerfile
Tom Neuber 74cb5e0264
All checks were successful
continuous-integration/drone/push Build is passing
refactor(Dockerfile): use new backup command as default
2024-07-30 21:22:27 +02:00

25 lines
549 B
Docker

FROM golang:1.22.5-bookworm AS build
# Create build workspace folder
WORKDIR /workspace
ADD . /workspace
# Install updates and build tools
RUN apt-get update --yes && \
apt-get install --yes build-essential
# Build the actual binary
RUN CGO_ENABLED=0 go build -o grafana-backuper cmd/main.go
# -- -- -- -- -- --
# Set up image to run the tool
FROM alpine
# Create main app folder to run from
WORKDIR /app
# Copy built binary from build image
COPY --from=build /workspace/grafana-backuper /app
ENTRYPOINT ["/app/grafana-backuper backup"]