Skip to content

Commit

Permalink
Dockerfile improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacon committed Feb 12, 2015
1 parent a985fa9 commit 2c32bd5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from ubuntu:14.04
run apt-get update -yq && apt-get install -yq bzr git golang nginx sudo && apt-get clean
env GOPATH /app
run go get github.com/rochacon/elastic-nginx
add etc/elastic-nginx.example.json /etc/elastic-nginx.json
run mkdir -p /etc/nginx/upstreams.d/backends-0 /etc/nginx/upstreams.d/backends-1
workdir /app
expose 5000
env AWS_ACCESS_KEY_ID <SECRET>
env AWS_SECRET_ACCESS_KEY <SECRET>
cmd /app/bin/elastic-nginx -listen 0.0.0.0:5000
FROM ubuntu:14.04
RUN apt-get update -yq && apt-get install -yq bzr git golang nginx sudo && apt-get clean
ENV GOPATH /app
ADD . /app/src/github.com/rochacon/elastic-nginx
RUN go get -d github.com/rochacon/elastic-nginx && go install github.com/rochacon/elastic-nginx
RUN cp /app/src/github.com/rochacon/elastic-nginx/etc/elastic-nginx.example.json /etc/elastic-nginx.json
RUN mkdir -p /etc/nginx/upstreams.d/backends-0 /etc/nginx/upstreams.d/backends-1
WORKDIR /app
EXPOSE 5000
# ENV AWS_ACCESS_KEY_ID <SECRET>
# ENV AWS_SECRET_ACCESS_KEY <SECRET>
ENTRYPOINT ["/app/bin/elastic-nginx"]
CMD ["-listen", "0.0.0.0:5000"]

0 comments on commit 2c32bd5

Please sign in to comment.