Skip to content

Commit

Permalink
add a Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau committed Jun 20, 2017
1 parent 340b0b0 commit 8fffc40
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.6

# Prepare app dir
RUN mkdir /app
WORKDIR /app
RUN mkdir ./run ./log

# Prepare virtualenv
RUN python3.6 -m venv ./virtualenv
RUN ./virtualenv/bin/pip install --upgrade pip setuptools

# Install dependencies
COPY ./requirements.txt .
RUN ./virtualenv/bin/pip install -r requirements.txt

# Install application
COPY README.md setup.py ./
COPY bin/ ./bin
COPY fakesmtpd/ ./fakesmtpd
COPY fakesmtpd_test/ ./fakesmtpd_test
RUN ./virtualenv/bin/pip install .

# Start eventstreamd
EXPOSE 25
COPY start.sh ./
CMD ["/app/start.sh"]
5 changes: 5 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

exec /app/virtualenv/bin/fakesmtpd -b 0.0.0.0 | tee /app/log/fakesmtpd

0 comments on commit 8fffc40

Please sign in to comment.