mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
fixes
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
parent
7a35c8fd39
commit
4b7ab239d7
|
@ -1,31 +1,25 @@
|
||||||
FROM alpine:edge
|
FROM golang:1.10-alpine AS builder
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
RUN apk --no-cache add \
|
||||||
ENV GOPATH /go
|
ca-certificates \
|
||||||
|
git
|
||||||
|
|
||||||
|
ENV PERKEEP_VERSION 0.10
|
||||||
|
|
||||||
|
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 -vr /go/bin/* /usr/local/bin/ \
|
||||||
|
&& echo "Build complete."
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
||||||
ENV PERKEEP_VERSION 0.10
|
COPY --from=builder /usr/local/bin/pk* /usr/bin/
|
||||||
|
COPY --from=builder /usr/local/bin/perkeepd /usr/bin/perkeepd
|
||||||
RUN buildDeps=' \
|
|
||||||
go \
|
|
||||||
git \
|
|
||||||
gcc \
|
|
||||||
libc-dev \
|
|
||||||
libgcc \
|
|
||||||
' \
|
|
||||||
set -x \
|
|
||||||
&& apk --no-cache add $buildDeps \
|
|
||||||
&& 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 \
|
|
||||||
&& echo "Build complete."
|
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT [ "perkeepd" ]
|
ENTRYPOINT [ "perkeepd" ]
|
||||||
|
|
|
@ -23,7 +23,7 @@ RUN git checkout "${TERRAFORM_VERSION}"
|
||||||
# See: https://github.com/golang/go/issues/10249
|
# See: https://github.com/golang/go/issues/10249
|
||||||
RUN go install ./vendor/...
|
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
|
&& mv bin/terraform /usr/bin/terraform
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
Loading…
Reference in New Issue
Block a user