Skip to content

Instantly share code, notes, and snippets.

@xynova
Last active August 4, 2017 14:54
Show Gist options
  • Save xynova/32d572453f4a061a1ba0fd6647f599b8 to your computer and use it in GitHub Desktop.
Save xynova/32d572453f4a061a1ba0fd6647f599b8 to your computer and use it in GitHub Desktop.
Docker build confd and package into alpine
FROM golang:1.8.3-alpine3.6 AS confd-build
WORKDIR /go/src/github.com/kelseyhightower
RUN apk --update add git bash
RUN git clone --depth 1 https://github.com/kelseyhightower/confd.git \
&& cd confd \
&& ./build
FROM alpine:3.6
COPY --from=confd-build /go/src/github.com/kelseyhightower/confd/bin/confd /bin/
RUN chmod +x /bin/confd
WORKDIR /etc/confd
RUN mkdir conf.d templates
VOLUME /etc/confd
ENTRYPOINT ["confd"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment