Skip to content

Commit

Permalink
Update Dockerfile to pull released artifact rather.
Browse files Browse the repository at this point in the history
With changes made using govvv and goreleaser it is now required
that the docker build pull the released binary from GH. This also
means the docker image uses a source of truth binary rather than
building from a checked out VCS which could be different code from
the released version if human error occurs.
  • Loading branch information
jrasell committed May 13, 2018
1 parent c4c996b commit 206cf94
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
FROM golang:alpine as builder
FROM alpine:latest

WORKDIR /go/src/github.com/jrasell/levant
COPY . .
RUN apk add --no-cache make \
&& make install
LABEL maintainer James Rasell<(jamesrasell@gmail.com> (@jrasell)
LABEL vendor "jrasell"

FROM alpine:latest
ENV LEVANT_VERSION 0.1.1

WORKDIR /usr/bin/

RUN apk add --no-cache ca-certificates
RUN buildDeps=' \
bash \
wget \
' \
set -x \
&& apk --no-cache add $buildDeps ca-certificates \
&& wget -O levant https://github.com/jrasell/levant/releases/download/${LEVANT_VERSION}/linux-amd64-levant \
&& chmod +x /usr/bin/levant \
&& apk del $buildDeps \
&& echo "Build complete."

COPY --from=builder /go/bin/levant /usr/bin/levant
CMD ["levant", "--help"]

0 comments on commit 206cf94

Please sign in to comment.