digital-ocean-volume-snapshots/Dockerfile

22 lines
413 B
Docker
Raw Permalink Normal View History

2021-02-04 00:30:37 +01:00
FROM golang:alpine AS build-base
WORKDIR /tmp/DigitalOceanSnapshotter
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY cmd ./cmd
RUN go build -o ./out ./cmd/DigitalOceanSnapshotter
FROM alpine:3.9
RUN apk add ca-certificates
COPY --from=build-base /tmp/DigitalOceanSnapshotter/out /app/DigitalOceanSnapshotter
RUN ["chmod", "+x", "/app/DigitalOceanSnapshotter"]
2021-12-08 15:39:34 +01:00
CMD ["/app/DigitalOceanSnapshotter"]