2018-09-05 18:48:06 +02:00
|
|
|
FROM golang:1.10-alpine AS builder
|
2018-05-12 22:21:02 +02:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
2018-09-05 18:48:06 +02:00
|
|
|
ca-certificates \
|
|
|
|
git
|
2018-05-12 22:21:02 +02:00
|
|
|
|
|
|
|
ENV PERKEEP_VERSION 0.10
|
|
|
|
|
2018-09-05 18:48:06 +02:00
|
|
|
RUN mkdir -p /go/src/perkeep.org \
|
2018-05-12 22:21:02 +02:00
|
|
|
&& 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 \
|
2018-09-05 18:48:06 +02:00
|
|
|
&& cp -vr /go/bin/* /usr/local/bin/ \
|
2018-05-12 22:21:02 +02:00
|
|
|
&& echo "Build complete."
|
|
|
|
|
2018-09-05 18:48:06 +02:00
|
|
|
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
|
2018-05-12 22:21:02 +02:00
|
|
|
|
|
|
|
ENTRYPOINT [ "perkeepd" ]
|