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

Optimize Dockerfile #1942

Merged
merged 5 commits into from
Apr 4, 2024
Merged

Optimize Dockerfile #1942

merged 5 commits into from
Apr 4, 2024

Conversation

duhow
Copy link
Contributor

@duhow duhow commented May 24, 2023

  • Properly mount git repository from a bind mount, this ensures content is deleted after image creation.
  • Update Python from 3.6 -> 3.9
  • Pull python3-dev instead of python-dev (2.7)
  • Add ENTRYPOINT to run command napalm directly.

NOTE: This requires docker buildx to build as per bind mount.

Copy link
Member

@mirceaulinic mirceaulinic left a comment

Choose a reason for hiding this comment

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

Looks good overall, thanks for this PR @duhow!

I left some comments and I've also suggest adding a Dockerignore file on this occasion to avoid sending all the massive build contex (but only what's necessary, napalm/ dir, setup.cfg or requirements files).

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@mirceaulinic mirceaulinic merged commit aaff777 into napalm-automation:develop Apr 4, 2024
6 checks passed
@duhow duhow deleted the dockerfile branch April 10, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants