forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jess Frazelle <[email protected]>
- Loading branch information
Showing
4 changed files
with
38 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,22 @@ | ||
FROM alpine:latest as builder | ||
FROM golang:alpine as builder | ||
|
||
RUN apk --no-cache add \ | ||
bzr \ | ||
ca-certificates \ | ||
git \ | ||
rpm \ | ||
xz | ||
git | ||
|
||
ENV PATH /go/bin:/usr/local/go/bin:$PATH | ||
ENV GOPATH /go | ||
|
||
RUN buildDeps=' \ | ||
go \ | ||
gcc \ | ||
g++ \ | ||
libc-dev \ | ||
libgcc \ | ||
' \ | ||
set -x \ | ||
&& apk --no-cache add $buildDeps \ | ||
&& go get github.com/coreos/clair/cmd/clair \ | ||
&& echo "Build complete." | ||
RUN go get github.com/coreos/clair/cmd/clair | ||
|
||
FROM alpine:latest | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates \ | ||
git \ | ||
rpm \ | ||
xz | ||
|
||
COPY --from=builder /go/bin/clair /usr/bin/clair | ||
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs | ||
|
||
ENTRYPOINT [ "clair" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,25 @@ | ||
FROM alpine:latest as builder | ||
FROM golang:alpine as builder | ||
LABEL maintainer "Christian Koep <[email protected]>" | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates \ | ||
git \ | ||
make | ||
|
||
ENV PATH /go/bin:/usr/local/go/bin:$PATH | ||
ENV GOPATH /go | ||
|
||
ENV MICRO_VERSION nightly | ||
|
||
RUN buildDeps=' \ | ||
go \ | ||
git \ | ||
gcc \ | ||
g++ \ | ||
libc-dev \ | ||
libgcc \ | ||
make \ | ||
' \ | ||
set -x \ | ||
&& apk --no-cache add $buildDeps \ | ||
&& git clone --depth 1 --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro \ | ||
&& cd /go/src/github.com/zyedidia/micro \ | ||
&& mkdir -p /go/bin \ | ||
&& make install \ | ||
&& echo "Build complete." | ||
RUN git clone --depth 1 --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro | ||
|
||
WORKDIR /go/src/github.com/zyedidia/micro | ||
|
||
RUN make install | ||
|
||
FROM alpine:latest | ||
|
||
COPY --from=builder /go/bin/micro /usr/bin/micro | ||
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs | ||
|
||
ENTRYPOINT [ "micro" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
FROM alpine:latest as builder | ||
FROM golang:alpine as builder | ||
LABEL maintainer "Jess Frazelle <[email protected]>" | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates \ | ||
git | ||
|
||
ENV PATH /go/bin:/usr/local/go/bin:$PATH | ||
ENV GOPATH /go | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates | ||
|
||
ENV TRANSFER_SH_VERSION master | ||
|
||
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." | ||
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 | ||
|
||
# Create a clean image without build dependencies | ||
FROM alpine:latest | ||
|