dockerfiles/transfer-sh/Dockerfile

34 lines
766 B
Docker
Raw Normal View History

2018-09-14 21:07:42 +02:00
FROM alpine:latest as builder
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 \
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
ENTRYPOINT [ "transfer.sh" ]
CMD [ "--help" ]