s3manager-web/Dockerfile

15 lines
412 B
Docker
Raw Normal View History

2020-05-04 15:35:59 +02:00
FROM golang:1 AS builder
RUN groupadd -r app && useradd --no-log-init -r -g app app
WORKDIR /app
2018-10-27 14:59:59 +02:00
COPY . ./
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -a -installsuffix cgo -o bin/s3manager ./cmd/s3manager
FROM scratch
2020-05-04 15:35:59 +02:00
WORKDIR /app
COPY --from=builder /app/bin/s3manager /app/web ./
COPY --from=builder /app/web ./web/
2018-11-30 23:09:00 +01:00
COPY --from=builder /etc/passwd /etc/passwd
2020-05-04 15:35:59 +02:00
USER app
2018-10-27 14:59:59 +02:00
EXPOSE 8080
ENTRYPOINT ["./s3manager"]