2018-09-14 21:22:09 +02:00
|
|
|
FROM golang:alpine as builder
|
2018-06-24 16:55:35 +02:00
|
|
|
LABEL maintainer "Jess Frazelle <jess@linux.com>"
|
|
|
|
|
2018-09-14 21:22:09 +02:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates \
|
|
|
|
git
|
|
|
|
|
2018-06-24 16:55:35 +02:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
|
|
|
ENV TRANSFER_SH_VERSION master
|
|
|
|
|
2018-09-14 21:22:09 +02:00
|
|
|
RUN git clone --depth 1 --branch ${TRANSFER_SH_VERSION} https://github.com/dutchcoders/transfer.sh /go/src/github.com/dutchcoders/transfer.sh
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/dutchcoders/transfer.sh
|
|
|
|
|
|
|
|
RUN go build -o /usr/bin/transfer.sh
|
2018-06-24 16:55:35 +02:00
|
|
|
|
2018-09-14 21:07:42 +02:00
|
|
|
# Create a clean image without build dependencies
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
COPY --from=builder /usr/bin/transfer.sh /usr/bin/transfer.sh
|
2018-09-14 21:11:31 +02:00
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2018-06-24 16:55:35 +02:00
|
|
|
|
|
|
|
ENTRYPOINT [ "transfer.sh" ]
|
|
|
|
CMD [ "--help" ]
|