Merge branch 'update-images'

This commit is contained in:
Cyrill Troxler 2021-04-05 12:47:30 +02:00
commit 68ef284b9b
2 changed files with 21 additions and 5 deletions

View file

@ -1,4 +1,12 @@
FROM debian:stretch
FROM golang:1.16-alpine as gobuild
WORKDIR /build
ADD . /build
RUN go get -d -v ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver
FROM debian:buster-slim
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
LABEL description="csi-s3 slim image"
@ -16,5 +24,5 @@ RUN cd /tmp \
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \
&& rm -r /tmp/rclone*
COPY ./_output/s3driver /s3driver
COPY --from=gobuild /build/s3driver /s3driver
ENTRYPOINT ["/s3driver"]

View file

@ -1,4 +1,12 @@
FROM debian:stretch as s3backer
FROM golang:1.16-alpine as gobuild
WORKDIR /build
ADD . /build
RUN go get -d -v ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver
FROM debian:buster-slim as s3backer
ARG S3BACKER_VERSION=1.5.0
RUN apt-get update && apt-get install -y \
@ -24,7 +32,7 @@ RUN ./autogen.sh && \
make && \
make install
FROM debian:stretch
FROM debian:buster-slim
LABEL maintainers="Cyrill Troxler <cyrilltroxler@gmail.com>"
LABEL description="csi-s3 image"
COPY --from=s3backer /usr/bin/s3backer /usr/bin/s3backer
@ -44,5 +52,5 @@ RUN cd /tmp \
&& mv /tmp/rclone-*-linux-amd64/rclone /usr/bin \
&& rm -r /tmp/rclone*
COPY ./_output/s3driver /s3driver
COPY --from=gobuild /build/s3driver /s3driver
ENTRYPOINT ["/s3driver"]