Skip to content

Commit

Permalink
Added instructions for Dockerfile build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucastheisen authored and kelseyhightower committed Aug 2, 2017
1 parent 5f3f79d commit 1e4e8fd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,36 @@ $ docker run -ti --rm -v $(pwd):/app confd_builder ./build
```
The above docker commands will produce binary in the local bin directory.

#### Build for your Image using Multi-Stage build

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...
```

### Next Steps

Get up and running with the [Quick Start Guide](quick-start-guide.md).

0 comments on commit 1e4e8fd

Please sign in to comment.