Skip to content

Commit

Permalink
Alpine 3.20 based Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
giuaig committed Sep 29, 2024
1 parent 6c91fd0 commit 0597871
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# mysql backup image
FROM golang:1.21.5-alpine3.19 as build
FROM golang:1.21.13-alpine3.20 AS build

COPY . /src/mysql-backup
WORKDIR /src/mysql-backup

RUN mkdir /out && go build -o /out/mysql-backup .

# we would do from scratch, but we need basic utilities in order to support pre/post scripts
FROM alpine:3.19
FROM alpine:3.20 AS runtime
LABEL org.opencontainers.image.authors="https://github.com/databacker"

# set us up to run as non-root user
RUN apk add bash
RUN addgroup -g 1005 appuser && \
RUN apk add --no-cache bash && \
addgroup -g 1005 appuser && \
adduser -u 1005 -G appuser -D appuser

USER appuser

COPY --from=build /out/mysql-backup /mysql-backup

COPY entrypoint /entrypoint

ENV DB_DUMP_PRE_BACKUP_SCRIPTS="/scripts.d/pre-backup/"
Expand Down

0 comments on commit 0597871

Please sign in to comment.