Skip to content

Commit 7338f9d

Browse files
committed
Updated dockerfiles and created alpine image
1 parent 9317a10 commit 7338f9d

File tree

3 files changed

+97
-7
lines changed

3 files changed

+97
-7
lines changed

.dockerignore

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#From .gitignore
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
env/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*,cover
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
56+
# Sphinx documentation
57+
docs/_build/
58+
59+
# PyBuilder
60+
target/
61+
62+
.idea/
63+
config.json
64+
ignorelist
65+
log
66+
67+
68+
#Docker specific files
69+
docs
70+
tests
71+
utils

Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ FROM python:3
22

33
MAINTAINER buluba89
44

5-
RUN export DEBIAN_FRONTEND='noninteractive' && \
6-
apt-get update -qq && \
7-
apt-get install git
5+
ADD . /build
86

9-
RUN git clone --depth 1 https://github.com/buluba89/Yatcobot.git /yatcobot &&\
10-
cd /yatcobot &&\
11-
pip3 install -r requirements.txt
7+
RUN cd /build &&\
8+
pip3 install pipenv &&\
9+
pipenv install --system &&\
10+
python setup.py install
1211

1312

13+
VOLUME ["/yatcobot"]
14+
1415
WORKDIR /yatcobot
1516

16-
ENTRYPOINT ["python3", "yatcobot.py"]
17+
ENTRYPOINT ["yatcobot"]
1718
CMD []

Dockerfile.alpine

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.6-alpine3.7
2+
3+
MAINTAINER buluba89
4+
5+
ADD . /build
6+
7+
RUN cd /build &&\
8+
pip3 install pipenv &&\
9+
pipenv install --system &&\
10+
python setup.py install
11+
12+
13+
VOLUME ["/yatcobot"]
14+
15+
WORKDIR /yatcobot
16+
17+
ENTRYPOINT ["yatcobot"]
18+
CMD []

0 commit comments

Comments
 (0)