mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 12:23:35 +01:00
parent
2d839cd5ac
commit
2d259b95ed
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest as builder
|
||||||
LABEL maintainer "Jess Frazelle <jess@linux.com>"
|
LABEL maintainer "Jess Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||||
|
@ -9,7 +9,8 @@ RUN apk --no-cache add \
|
||||||
|
|
||||||
ENV TRANSFER_SH_VERSION master
|
ENV TRANSFER_SH_VERSION master
|
||||||
|
|
||||||
RUN buildDeps=' \
|
RUN set -x \
|
||||||
|
&& apk --no-cache add \
|
||||||
bash \
|
bash \
|
||||||
go \
|
go \
|
||||||
git \
|
git \
|
||||||
|
@ -18,16 +19,15 @@ RUN buildDeps=' \
|
||||||
libc-dev \
|
libc-dev \
|
||||||
libgcc \
|
libgcc \
|
||||||
make \
|
make \
|
||||||
' \
|
|
||||||
set -x \
|
|
||||||
&& apk --no-cache add $buildDeps \
|
|
||||||
&& git clone --depth 1 --branch ${TRANSFER_SH_VERSION} https://github.com/dutchcoders/transfer.sh /go/src/github.com/dutchcoders/transfer.sh \
|
&& 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 \
|
&& cd /go/src/github.com/dutchcoders/transfer.sh \
|
||||||
&& go build -o /usr/bin/transfer.sh \
|
&& go build -o /usr/bin/transfer.sh \
|
||||||
&& apk del $buildDeps \
|
|
||||||
&& rm -rf /go \
|
|
||||||
&& echo "Build complete."
|
&& echo "Build complete."
|
||||||
|
|
||||||
|
# Create a clean image without build dependencies
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
COPY --from=builder /usr/bin/transfer.sh /usr/bin/transfer.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "transfer.sh" ]
|
ENTRYPOINT [ "transfer.sh" ]
|
||||||
CMD [ "--help" ]
|
CMD [ "--help" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user