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

Flexible-docker-entrypoint #1764

Merged
merged 4 commits into from
Dec 13, 2021
Merged

Flexible-docker-entrypoint #1764

merged 4 commits into from
Dec 13, 2021

Conversation

bjoernricks
Copy link
Contributor

What:

Use gosu to run gvmd as dedicated gvmd user.

Why:

Alllow to become root for debugging purposes.

> docker run -it --rm greenbone/gvmd:unstable id                
uid=1001(gvmd) gid=1001(gvmd) groups=1001(gvmd)

> docker run -it --rm --entrypoint='' greenbone/gvmd:unstable id 
uid=0(root) gid=0(root) groups=0(root)

How did you test it:

Checklist:

  • Tests
  • PR merge commit message adjusted

Just ensure that /var/lib/gvm exists before trying to change its
permissions.
Instead of changing the user in the dockerfile add an entrypoint script
that uses gosu to switch to the dedicated gvmd user before starting the
command. This allows becoming root in the container by resetting the
entrypoint.
@bjoernricks bjoernricks requested review from a team as code owners December 10, 2021 13:06
@bjoernricks bjoernricks added backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch labels Dec 10, 2021
@bjoernricks bjoernricks merged commit 32079f0 into main Dec 13, 2021
@bjoernricks bjoernricks deleted the flexible-docker-entrypoint branch December 13, 2021 16:09
y0urself added a commit that referenced this pull request Dec 13, 2021
y0urself added a commit that referenced this pull request Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-oldstable This pull request will be backported to the oldstable branch backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants