docker-s3-backup/Dockerfile

19 lines
271 B
Docker
Raw Permalink Normal View History

2023-09-14 22:15:37 +00:00
FROM golang:1 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /dsb
FROM builder as tester
RUN go test -v
FROM debian:12-slim
COPY --from=builder /dsb /dsb
ENTRYPOINT [ "/dsb" ]
CMD [ "schedule" ]