-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 <acidburn@microsoft.com>
- Loading branch information
Showing
2 changed files
with
13 additions
and
19 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,31 +1,25 @@ | ||
FROM alpine:edge | ||
FROM golang:1.10-alpine AS builder | ||
LABEL maintainer "Jessie Frazelle <jess@linux.com>" | ||
|
||
ENV PATH /go/bin:/usr/local/go/bin:$PATH | ||
ENV GOPATH /go | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates | ||
ca-certificates \ | ||
git | ||
|
||
ENV PERKEEP_VERSION 0.10 | ||
|
||
RUN buildDeps=' \ | ||
go \ | ||
git \ | ||
gcc \ | ||
libc-dev \ | ||
libgcc \ | ||
' \ | ||
set -x \ | ||
&& apk --no-cache add $buildDeps \ | ||
&& mkdir -p /go/src/perkeep.org \ | ||
RUN mkdir -p /go/src/perkeep.org \ | ||
&& git clone --depth 1 --branch "${PERKEEP_VERSION}" https://camlistore.googlesource.com/camlistore.git /go/src/perkeep.org \ | ||
&& cd /go/src/perkeep.org \ | ||
&& go run make.go \ | ||
&& cp -r /go/bin/* /usr/local/bin/ \ | ||
&& apk del $buildDeps \ | ||
&& rm -rf /go \ | ||
&& cp -vr /go/bin/* /usr/local/bin/ \ | ||
&& echo "Build complete." | ||
|
||
FROM alpine:latest | ||
|
||
RUN apk --no-cache add \ | ||
ca-certificates | ||
|
||
COPY --from=builder /usr/local/bin/pk* /usr/bin/ | ||
COPY --from=builder /usr/local/bin/perkeepd /usr/bin/perkeepd | ||
|
||
ENTRYPOINT [ "perkeepd" ] |
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