Skip to content

Commit 23a9981

Browse files
author
Marco Paolini
committed
Add docker automation
1 parent 4c6faee commit 23a9981

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

.dockerignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/virtual*
2+
/dist
3+
/.tox
4+
/.cache
5+
__pycache__
6+
*.pyc
7+
/static
8+
/build
9+
/develop-eggs
10+
/dist
11+
/eggs
12+
/sdist
13+
*.egg-info/
14+
*.egg
15+
*.manifest
16+
*.spec
17+

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ build
2424
*.spec
2525
/.tox
2626
/.cache
27+
/wheelhouse-app
28+
/wheelhouse

Dockerfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.5.1
2+
3+
RUN mkdir /tmp/build
4+
WORKDIR /tmp/build
5+
ADD ./wheelhouse ./wheelhouse
6+
ADD requirements.txt ./
7+
RUN python3.5 -m pip install --no-cache-dir --no-index -f wheelhouse -r requirements.txt && \
8+
rm -rf wheelhouse
9+
ADD /wheelhouse-app ./wheelhouse-app
10+
RUN python3.5 -m pip install --no-cache-dir --no-index -f wheelhouse-app --no-deps -U pushpull && \
11+
rm -rf wheelhouse-app
12+
13+
RUN adduser --disabled-password --disabled-login --home /app --system -q app
14+
WORKDIR /app
15+
USER app
16+
ENTRYPOINT ["python3.5", "-m", "pushpull.cli.server"]
17+
EXPOSE 8080

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ Run the CLI websocket client:
3636
Run the CLI rabbitmq client:
3737

3838
python -m pushpull.cli.client challenge_amqp
39+
40+
# Build docker image
41+
42+
use python3.5
43+
44+
install wheel
45+
46+
pip install wheel
47+
48+
Build wheels for 3rd party and the project itself
49+
50+
``` bash
51+
pip wheel -r requirements.txt -w wheelhouse
52+
pip wheel . --no-deps -w wheelhouse-app
53+
docker build -t pushpull .
54+
```

0 commit comments

Comments
 (0)