Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce docker image size #394

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 : \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this : notation in this line RUN : \ @sanders41? I never saw that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just let me split it across multiple lines from the start.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, cool!! :D

&& 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