Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
  • Loading branch information
jessfraz committed Sep 5, 2018
1 parent 7a35c8f commit 4b7ab23
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
30 changes: 12 additions & 18 deletions perkeep/Dockerfile
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" ]
2 changes: 1 addition & 1 deletion terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN git checkout "${TERRAFORM_VERSION}"
# See: https://github.com/golang/go/issues/10249
RUN go install ./vendor/...

RUN XC_ARCH="amd64" XC_OS="linux" LD_FLAGS=" -extldflags -static" make bin \
RUN XC_ARCH="amd64" XC_OS="linux" LD_FLAGS=" -extldflags -static" make fmt bin \
&& mv bin/terraform /usr/bin/terraform

FROM alpine:latest
Expand Down

0 comments on commit 4b7ab23

Please sign in to comment.