Skip to content

Commit

Permalink
Reduce docker image size
Browse files Browse the repository at this point in the history
  • Loading branch information
sanders41 committed Jun 2, 2023
1 parent 0c35e68 commit 356efc6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Build artifacts
build/
dist/

# Git/GitHub
.git/
.github/
.gitignore

# Python specific files
**/__pycache__
**/.mypy_cache/
**/.pylintrc/
**/.pytest_cache/
**/*.py[cod]
**/*.egg
**/tests/
pytest.ini
tox.ini

# C extensions
*.so

# pyenv
**/.python-version

# Virtual Environments
**/.env
**/.venv
**/env/
**/venv/

# Editors
**/.vscode/
**/.idea/

# Docker
docker-compose.yml
docker-compose.yaml
Dockerfile

# Project files
.editorconfig
bors.toml
CONTRIBUTING.md
README.md
assets/

# System files
.DS_Store
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ ENV LANG C.UTF-8

WORKDIR /docs-scraper

RUN apt-get update -y && apt-get install -y python3-pip libnss3 chromium-driver
RUN : \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
libnss3 \
chromium-driver \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install pipenv
RUN pip install -U pip && pip install pipenv --no-cache-dir

COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
Expand Down

0 comments on commit 356efc6

Please sign in to comment.