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

Fix GID on development container #4120

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions aio/develop/gosu-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
# limitations under the License.

# Create and switch user to "user" with same UID and GID as local.
groupadd -g ${LOCAL_GID} user
if [[ -z "$(cat /etc/group | grep ':${LOCAL_GID}:')" ]] ; then
groupadd -g ${LOCAL_GID} user
fi
useradd -u ${LOCAL_UID} -g ${LOCAL_GID} -d /home/user user
chown -R user:user /home/user
chown -R ${LOCAL_UID}:${LOCAL_GID} /home/user

# Add user as sudoer without password
echo "user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/user
Expand Down