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

[bookworm] Fix docker gid mismatch with host #17158

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

vivekrnv
Copy link
Contributor

@vivekrnv vivekrnv commented Nov 14, 2023

Why I did it

Fix #17155

Check the ticket for more details

How I did it

How to verify it

vkarri@build-server:/sonic-buildimage$ NOBUSTER=1 NOBULLSEYE=1 make SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=y sonic-slave-bash

vkarri@0fdfd946d5a7:/sonic$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

vkarri@0fdfd946d5a7:/sonic$ docker ps -a
CONTAINER ID   IMAGE                                             COMMAND                  CREATED          STATUS                      PORTS     NAMES
0fdfd946d5a7   sonic-slave-bookworm-vkarri:969180aefd            "bash"                   3 minutes ago    Up 3 minutes                22/tcp    admiring_swirles

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@vivekrnv vivekrnv marked this pull request as ready for review November 14, 2023 02:27
@vivekrnv vivekrnv requested review from saiarcot895 and removed request for lguohan, qiluo-msft and xumia November 14, 2023 02:27
@k-v1
Copy link
Contributor

k-v1 commented Nov 15, 2023

Maybe it's better to do this when running a container with option --group-add and only when SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD is enabled.

ifeq ($(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD), y)
ifneq ($(MULTIARCH_QEMU_ENVIRON), y)
    DOCKER_RUN += -v /var/run/docker.sock:/var/run/docker.sock --group-add $(HOST_DOCKERD_GID)
endif
endif

Not tested enough, just a suggestion.

@vivekrnv
Copy link
Contributor Author

Seems like a good idea, will test and update

@vivekrnv
Copy link
Contributor Author

Tested and working

vkarri@build-server:/sonic-buildimage$$ NOBUSTER=1 NOBULLSEYE=1 make SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD=y sonic-slave-bash
+++ Making sonic-slave-bash +++
BLDENV=bookworm make -f Makefile.work sonic-slave-bash
Checking sonic-slave-base image: sonic-slave-bookworm:79736ea1df
Checking sonic-slave-user image: sonic-slave-bookworm-vkarri:e34194ed53

vkarri@6671a1c40942:/sonic$ docker ps -a
CONTAINER ID   IMAGE                                             COMMAND                  CREATED         STATUS                    PORTS     NAMES
6671a1c40942   sonic-slave-bookworm-vkarri:e34194ed53            "bash"                   3 seconds ago   Up 2 seconds              22/tcp    sharp_torvalds
f06792152ffa   sonic-slave-bullseye-vkarri:e54e2f2172            "bash"                   10 hours ago    Up 10 hours               22/tcp    zealous_einstein

@yxieca yxieca merged commit 98fc38e into sonic-net:bookworm Nov 17, 2023
18 checks passed
saiarcot895 pushed a commit to saiarcot895/sonic-buildimage that referenced this pull request Nov 21, 2023
* [bookworm] Fix docker gid mismatch with host
* Use group-add arg instead of update sonic-slave user

Signed-off-by: Vivek Reddy <[email protected]>
yxieca pushed a commit that referenced this pull request Nov 22, 2023
* [bookworm] Fix docker gid mismatch with host
* Use group-add arg instead of update sonic-slave user

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

Successfully merging this pull request may close these issues.

4 participants