s3manager-web/Dockerfile

17 lines
516 B
Docker
Raw Permalink Normal View History

2023-10-02 22:33:53 +02:00
FROM docker.io/library/golang:1 AS builder
2021-01-15 14:36:01 +01:00
WORKDIR /usr/src/app
2018-10-27 14:59:59 +02:00
COPY . ./
2021-04-21 11:02:51 +02:00
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -a -installsuffix cgo -o bin/s3manager
2018-10-27 14:59:59 +02:00
2023-10-02 22:33:53 +02:00
FROM docker.io/library/alpine:latest
2021-01-15 14:36:01 +01:00
WORKDIR /usr/src/app
RUN addgroup -S s3manager && adduser -S s3manager -G s3manager
RUN apk add --no-cache \
ca-certificates \
dumb-init
COPY --from=builder --chown=s3manager:s3manager /usr/src/app/bin/s3manager ./
USER s3manager
2018-10-27 14:59:59 +02:00
EXPOSE 8080
2021-01-15 14:36:01 +01:00
ENTRYPOINT [ "/usr/bin/dumb-init", "--" ]
CMD [ "/usr/src/app/s3manager" ]