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

Update Dockerfile #321

Merged
merged 3 commits into from
Jun 16, 2023
Merged

Update Dockerfile #321

merged 3 commits into from
Jun 16, 2023

Conversation

rizlas
Copy link
Contributor

@rizlas rizlas commented Jun 16, 2023

Hi,
I just updated the Dockerfile of netbox-sync image. Here's a recap:

  • Update base image to debian 12
  • Install dependencies via venv in order to avoid copy of useless packages in the next stage
  • Do not upgrade images as base images are always upgraded and it is not a common best practice
  • Removed pip install wheel as is already specified in requirements.txt
  • Changed from adduser and addgroup to useradd and groupadd
  • Use dockerignore instead of copy specific files
  • Removed dockerfile from image. Could lead to a security flaw/issue.
  • Updated urllib package to the latest minor
  • Added PATH and TZ environment variables. Former is needed to use venv packages, latter to have consistent logging time.

The overall images size is now ~40MB smaller.
Other packages, in particular pyvmomi needs an update, but there might be some breaking changes to deal with.

rizlas added 3 commits June 16, 2023 16:21

Verified

This commit was signed with the committer’s verified signature.

Verified

This commit was signed with the committer’s verified signature.
…py files in next stage and reduce image size. Better apt-get install and no upgrade. Removed wheel install because already specified in requirements.txt. Use groupadd and useradd instead of addgroup and adduser. Copy entire folder, useless files are ignored via dockerignore. Set PATH to venv. Added TZ specification.

Verified

This commit was signed with the committer’s verified signature.
@bb-Ricardo bb-Ricardo added this to the 1.5.0 milestone Jun 16, 2023
@bb-Ricardo
Copy link
Owner

This looks great, thank you very much. I like it a lot

@bb-Ricardo bb-Ricardo merged commit a6fff45 into bb-Ricardo:development Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants