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

Docker: Add the ability to override the FRR UID during docker creation #17520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikemallin
Copy link
Contributor

@mikemallin mikemallin commented Nov 26, 2024

This PR adds the ability to override the UID of the FRR user with the additional docker argument --build-arg=UID=$(id -u).

When using docker containers to develop FRR, it is much easier to manage copying files in and out of the container if the UID of the FRR user is also the same as the user that created the container.

For reference, I use the following commands to create my local development container:

docker build -t $(whoami)-$(basename `/bin/pwd`)-frr-ubuntu20:latest --build-arg=UBUNTU_VERSION=20.04 --build-arg=UID=$(id -u) -f docker/ubuntu20-ci/Dockerfile .

docker run --init -it --privileged --name $(whoami)-$(basename `/bin/pwd`)-frr-ubuntu20 -v /lib/modules:/lib/modules -v `/bin/pwd`:/home/frr/frr $(whoami)-$(basename `/bin/pwd`)-frr-ubuntu20:latest bash

docker start $(whoami)-$(basename `/bin/pwd`)-frr-ubuntu20

Signed-off-by: Mike RE Mallin <[email protected]>
Signed-off-by: Mike RE Mallin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants