-
Notifications
You must be signed in to change notification settings - Fork 8
feat: clean up Dockerfile and reduce image size #106
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
base: main
Are you sure you want to change the base?
Conversation
ikajdan
commented
Sep 21, 2025
- Replace ADD with COPY to avoid unnecessary behaviors
- Install packages with --no-install-recommends to keep images slim
- Clean up apt lists to reduce image size
- Simplify user creation (fixes Runner user creation fails in Docker image #105)
|
Hi @sjoerdsimons, any chance someone could take a look this? Since it hasn't seen activity for a while. |
|
Please split things up in multiple commits and document your commits better e.g. |
Remove the DEBIAN_FRONTEND=noninteractive argument from both build and runtime stages of the Dockerfile. This argument is unnecessary in this context and can be omitted to simplify the Dockerfile.
Install build-time and runtime dependencies with --no-install-recommends to prevent pulling in unnecessary packages. This reduces the final image size and build time bandwidth usage.
Use apt-get consistently and remove /var/lib/apt/lists after installing runtime packages to avoid leaving behind package index files. This reduces the final image size.
Replace adduser with explicit groupadd and useradd commands to define the user and group IDs directly. This makes user creation more predictable.
Use COPY instead of ADD when copying the build context into the image. Using COPY is better here because it provides strictly predictable behavior by copying the build context verbatim, avoiding implicit archive extraction or remote downloads.
Add a trailing slash to the COPY destination to indicate a directory target and remove redundant whitespace from the ENTRYPOINT array.
|
Sorry for the delayed response. Please feel free to review the changes at your convenience. |
|
@sjoerdsimons, sorry for the nudge again. When you get a chance, could you take a look at this? |