Skip to content

Conversation

@ikajdan
Copy link

@ikajdan 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)

- 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 and drop redundant ARG
@ikajdan
Copy link
Author

ikajdan commented Nov 23, 2025

Hi @sjoerdsimons, any chance someone could take a look this? Since it hasn't seen activity for a while.

@sjoerdsimons
Copy link
Contributor

Please split things up in multiple commits and document your commits better e.g. Replace ADD with COPY to avoid unnecessary behaviors -> explain what the unecessary behaviours are you're avoiding.

COPY . .

RUN apt-get update && \
apt-get install -y --no-install-recommends pkg-config libssl-dev cmake && \
Copy link
Contributor

Choose a reason for hiding this comment

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

please don't spuriously change layout/indentation in a commit with actual changes, it makes things ahrder to review

apt-get install -y --no-install-recommends libssl3 ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
groupadd -g 1001 lava-gitlab-runner && \
useradd -u 1001 -g lava-gitlab-runner -d /app -M lava-gitlab-runner
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep one logical change per RUN actions ; adduser and installing libssl are two very orthogonal things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Runner user creation fails in Docker image

2 participants