2018-09-14 21:07:42 +02:00
|
|
|
FROM alpine:latest as builder
|
2018-06-24 16:55:35 +02:00
|
|
|
LABEL maintainer "Jess Frazelle <jess@linux.com>"
|
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates
|
|
|
|
|
|
|
|
ENV TRANSFER_SH_VERSION master
|
|
|
|
|
2018-09-14 21:07:42 +02:00
|
|
|
RUN set -x \
|
|
|
|
&& apk --no-cache add \
|
2018-06-24 16:55:35 +02:00
|
|
|
bash \
|
|
|
|
go \
|
|
|
|
git \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
make \
|
|
|
|
&& git clone --depth 1 --branch ${TRANSFER_SH_VERSION} https://github.com/dutchcoders/transfer.sh /go/src/github.com/dutchcoders/transfer.sh \
|
|
|
|
&& cd /go/src/github.com/dutchcoders/transfer.sh \
|
|
|
|
&& go build -o /usr/bin/transfer.sh \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
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-06-24 16:55:35 +02:00
|
|
|
|
|
|
|
ENTRYPOINT [ "transfer.sh" ]
|
|
|
|
CMD [ "--help" ]
|