docker-volume-backup/Dockerfile

24 lines
484 B
Docker
Raw Normal View History

2021-04-02 13:59:47 +02:00
# Copyright 2021 - Offen Authors <hioffen@posteo.de>
2021-07-01 15:16:39 +02:00
# SPDX-License-Identifier: MPL-2.0
2021-08-19 11:08:36 +02:00
FROM golang:1.17-alpine as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
2021-08-22 18:07:32 +02:00
COPY cmd/backup/main.go ./cmd/backup/main.go
RUN go build -o backup cmd/backup/main.go
2021-04-02 13:59:47 +02:00
2021-06-28 20:25:21 +02:00
FROM alpine:3.14
2021-04-02 13:59:47 +02:00
WORKDIR /root
2021-12-10 10:18:52 +01:00
RUN apk add --update ca-certificates sudo
2021-04-02 13:59:47 +02:00
COPY --from=builder /app/backup /usr/bin/backup
2021-04-02 13:59:47 +02:00
2021-08-22 18:07:32 +02:00
COPY ./entrypoint.sh /root/
RUN chmod +x entrypoint.sh
2021-04-02 13:59:47 +02:00
ENTRYPOINT ["/root/entrypoint.sh"]