Skip to content

Update Dockerfile#321

Merged
bb-Ricardo merged 3 commits into
bb-Ricardo:developmentfrom
rizlas:development
Jun 16, 2023
Merged

Update Dockerfile#321
bb-Ricardo merged 3 commits into
bb-Ricardo:developmentfrom
rizlas:development

Conversation

@rizlas

@rizlas rizlas commented Jun 16, 2023

Copy link
Copy Markdown
Contributor

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
…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.
@bb-Ricardo bb-Ricardo added this to the 1.5.0 milestone Jun 16, 2023
@bb-Ricardo

Copy link
Copy Markdown
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.

2 participants