Skip to content

Commit

Permalink
Add Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejholmes committed Sep 8, 2015
1 parent 7f874d7 commit ae0aba0
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:2.7.10
MAINTAINER Mike Barrett

COPY scripts/docker-stacker /bin/docker-stacker
RUN mkdir -p /stacks
COPY . /tmp/stacker
RUN cd /tmp/stacker && python setup.py install && rm -rf /tmp/stacker

ENTRYPOINT ["docker-stacker"]
CMD ["-h"]
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: build

build:
docker build -t remind101/stacker .
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,11 @@ Stacker would then name the VPC stack ``stageVPC``.
.. _Remind: http://www.remind.com/
.. _troposphere: https://github.com/cloudtools/troposphere
.. _string.Template: https://docs.python.org/2/library/string.html#template-strings

Docker
======

Stack can also be executed from Docker. Use this method to run stacker if you
want to avoid setting up a python environment::

docker run -v `pwd`:/stacks remind101/stacker build ...
11 changes: 11 additions & 0 deletions scripts/docker-stacker
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# This script is meant to be used from within the Docker image for stacker. It
# simply installs the stacks at /stacks and then runs stacker.

set -e

cd /stacks
python setup.py install

exec stacker $@

0 comments on commit ae0aba0

Please sign in to comment.