Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Update Docker configuration files

Open arkid15r opened this issue 1 year ago • 2 comments

Checklist

  • [x] I have followed the Contributor Guidelines.
  • [x] The code has been thoroughly tested in my local development environment with flake8 and pylint.
  • [x] The code is Python 3 compatible.
  • [x] The code follows the PEP8 styling guidelines with 4 spaces indentation.
  • [x] This Pull Request relates to only one issue or only one feature
  • [ ] I have referenced the corresponding issue number in my commit message
  • [ ] I have added the relevant documentation.
  • [x] My branch is up-to-date with the Upstream master branch.

Changes proposed in this pull request

Update Docker configuration files to minimize the layers amount and make the code more readable.

upd: The initial heredocs approach was replaced with RUN commands chained with && \ due to the unsatisfied buildkit requirements. I added missing apt-utils package to resolve debconf: delaying package configuration, since apt-utils is not installed and set DEBIAN_FRONTEND to noninteractive. Also added a couple of cleanup instructions to minimize the image size.

arkid15r avatar Oct 10 '23 20:10 arkid15r

This is not backwardly-compatible with Docker v20.10 as it fails with error: Error response from daemon: dockerfile parse error line 9: unknown instruction: MKDIR

Screenshot 2023-10-23 at 01 17 32

It works in Docker v23.0, however the saving on the image provided by this PR is minimal, so I am not going to merge it just yet

securestep9 avatar Oct 23 '23 00:10 securestep9

It works in Docker v23.0, however the saving on the image provided by this PR is minimal, so I am not going to merge it just yet

Well, that makes sense. I'm surprised it worked at all as heredocs requires buiildkit/buildx. I've changed that part and added a sort of smoke tests for multiple docker engine versions -- 24.0, 23.0, and 20.10 (I guess that's what you were doing manually). It just checks whether the image is buildable. This job is required to be successful for running test job now.

PTAL when you have a chance.

arkid15r avatar Oct 23 '23 15:10 arkid15r