Skip to content

Commit 356efc6

Browse files
committed
Reduce docker image size
1 parent 0c35e68 commit 356efc6

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

.dockerignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Build artifacts
2+
build/
3+
dist/
4+
5+
# Git/GitHub
6+
.git/
7+
.github/
8+
.gitignore
9+
10+
# Python specific files
11+
**/__pycache__
12+
**/.mypy_cache/
13+
**/.pylintrc/
14+
**/.pytest_cache/
15+
**/*.py[cod]
16+
**/*.egg
17+
**/tests/
18+
pytest.ini
19+
tox.ini
20+
21+
# C extensions
22+
*.so
23+
24+
# pyenv
25+
**/.python-version
26+
27+
# Virtual Environments
28+
**/.env
29+
**/.venv
30+
**/env/
31+
**/venv/
32+
33+
# Editors
34+
**/.vscode/
35+
**/.idea/
36+
37+
# Docker
38+
docker-compose.yml
39+
docker-compose.yaml
40+
Dockerfile
41+
42+
# Project files
43+
.editorconfig
44+
bors.toml
45+
CONTRIBUTING.md
46+
README.md
47+
assets/
48+
49+
# System files
50+
.DS_Store

Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ ENV LANG C.UTF-8
55

66
WORKDIR /docs-scraper
77

8-
RUN apt-get update -y && apt-get install -y python3-pip libnss3 chromium-driver
8+
RUN : \
9+
&& apt-get update -y \
10+
&& apt-get install -y --no-install-recommends \
11+
libnss3 \
12+
chromium-driver \
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/*
915

10-
RUN pip3 install pipenv
16+
RUN pip install -U pip && pip install pipenv --no-cache-dir
1117

1218
COPY Pipfile Pipfile
1319
COPY Pipfile.lock Pipfile.lock

0 commit comments

Comments
 (0)