Skip to content

Commit 8fffc40

Browse files
committed
add a Dockerfile
1 parent 340b0b0 commit 8fffc40

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM python:3.6
2+
3+
# Prepare app dir
4+
RUN mkdir /app
5+
WORKDIR /app
6+
RUN mkdir ./run ./log
7+
8+
# Prepare virtualenv
9+
RUN python3.6 -m venv ./virtualenv
10+
RUN ./virtualenv/bin/pip install --upgrade pip setuptools
11+
12+
# Install dependencies
13+
COPY ./requirements.txt .
14+
RUN ./virtualenv/bin/pip install -r requirements.txt
15+
16+
# Install application
17+
COPY README.md setup.py ./
18+
COPY bin/ ./bin
19+
COPY fakesmtpd/ ./fakesmtpd
20+
COPY fakesmtpd_test/ ./fakesmtpd_test
21+
RUN ./virtualenv/bin/pip install .
22+
23+
# Start eventstreamd
24+
EXPOSE 25
25+
COPY start.sh ./
26+
CMD ["/app/start.sh"]

start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
exec /app/virtualenv/bin/fakesmtpd -b 0.0.0.0 | tee /app/log/fakesmtpd

0 commit comments

Comments
 (0)