Skip to content

use docker without sudo#3336

Merged
lguohan merged 7 commits intosonic-net:masterfrom
tim-rj:master
Aug 26, 2019
Merged

use docker without sudo#3336
lguohan merged 7 commits intosonic-net:masterfrom
tim-rj:master

Conversation

@tim-rj
Copy link
Copy Markdown
Contributor

@tim-rj tim-rj commented Aug 14, 2019

- What I did

- How I did it

- How to verify it

- Description for the changelog

 Users can install docker with sudo, and it requires sudo to issue docker command. This will cause few errors in Makefile.work which need use docker without sudo.

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

Copy link
Copy Markdown
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

This instruction seems out-of-place between git checkout and make init. Also, it doesn't explain the purpose for needing to use docker without sudo. It seems like it belongs in a separate section for optional helpful steps.

@tim-rj
Copy link
Copy Markdown
Contributor Author

tim-rj commented Aug 14, 2019

This instruction seems out-of-place between git checkout and make init. Also, it doesn't explain the purpose for needing to use docker without sudo. It seems like it belongs in a separate section for optional helpful steps.

if one install docker with sudo, and run into 'make init' section, it throws out error which requires to install the docker package. The related script is at line 55 of Makefile.work file. It is at "docker_ver := $(shell docker info)"

@jleveque
Copy link
Copy Markdown
Contributor

This is a command you should only need to run once when you set up your environment. I don't think it belongs in the "Usage" section. I think it would be better in a section below "Prerequisites" (or part of that section), maybe like the following:

## Configure your system to allow running the 'docker' command without 'sudo'
      1. Add current user to the docker group
	 `sudo gpasswd -a ${USER} docker`
      2. Log out and log back in so that your group membership is re-evaluated

@tim-rj
Copy link
Copy Markdown
Contributor Author

tim-rj commented Aug 15, 2019

This is a command you should only need to run once when you set up your environment. I don't think it belongs in the "Usage" section. I think it would be better in a section below "Prerequisites" (or part of that section), maybe like the following:

## Configure your system to allow running the 'docker' command without 'sudo'
      1. Add current user to the docker group
	 `sudo gpasswd -a ${USER} docker`
      2. Log out and log back in so that your group membership is re-evaluated

Ok. I put it as part of the "Prerequisites" section.
Many thanks.

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Aug 15, 2019

please fix your merge conflict

@lguohan lguohan merged commit 9e44070 into sonic-net:master Aug 26, 2019
@ritacxl
Copy link
Copy Markdown

ritacxl commented Sep 2, 2019

Very helpful, avoiding compilation errors

wangshengjun pushed a commit to wangshengjun/sonic-buildimage that referenced this pull request Nov 16, 2020
 Users can install docker with sudo, and it requires sudo to issue docker command. This will cause few errors in Makefile.work which need use docker without sudo.
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.

4 participants