Currently confd ships binaries for OS X and Linux 64bit systems. You can download the latest release from GitHub
$ wget https://github.com/kelseyhightower/confd/releases/download/v0.12.0/confd-0.12.0-darwin-amd64
$ wget https://github.com/kelseyhightower/confd/releases/download/v0.12.0/confd-0.12.0-linux-amd64
$ ./build
$ sudo ./install
Since many people are using Alpine Linux as their base images for Docker there's support to build Alpine package also. Naturally by using Docker itself. :)
$ docker build -t confd_builder -f Dockerfile.build.alpine .
$ docker run -ti --rm -v $(pwd):/app confd_builder ./build
The above docker commands will produce binary in the local bin directory.
With multi-stage builds you can keep the whole process contained in your Dockerfile using:
FROM alpine:3.6 as confd
ENV GOPATH /go
RUN mkdir -p "$GOPATH/src/" "$GOPATH/bin" && chmod -R 777 "$GOPATH" && \
mkdir -p /go/src/github.com/kelseyhightower/confd
RUN apk --update add unzip curl go bash && \
ln -s /go/src/github.com/kelseyhightower/confd /app
WORKDIR /app
RUN curl -L https://github.com/kelseyhightower/confd/archive/v0.12.0-alpha3.zip --output /tmp/confd.zip && \
unzip -d /tmp/confd /tmp/confd.zip && \
cp -r /tmp/confd/*/* /app && \
rm -rf /tmp/confd* && \
./build
FROM tomcat:8.5.15-jre8-alpine
COPY --from=confd /app/bin/confd /usr/local/bin/confd
# Then do other useful things...
Get up and running with the Quick Start Guide.