Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine 3.20 based Docker image #361

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading