s3manager-web/Dockerfile

17 lines
500 B
Docker
Raw Normal View History

2022-08-04 22:30:04 +02:00
FROM docker.io/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
2022-08-04 22:30:04 +02:00
FROM docker.io/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" ]