mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-12-28 03:00:24 +01:00
25 lines
493 B
Docker
25 lines
493 B
Docker
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
FROM golang:1.17-alpine as builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY cmd/backup ./cmd/backup/
|
|
WORKDIR /app/cmd/backup
|
|
RUN go build -o backup .
|
|
|
|
FROM alpine:3.15
|
|
|
|
WORKDIR /root
|
|
|
|
RUN apk add --update --no-cache ca-certificates
|
|
|
|
COPY --from=builder /app/cmd/backup/backup /usr/bin/backup
|
|
|
|
COPY ./entrypoint.sh /root/
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
ENTRYPOINT ["/root/entrypoint.sh"]
|