File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ services:
33
44 vscode :
55 image : ghcr.io/edythecow/vscode-server
6- user : " 1000:113 " # Your user ID : Docker group ID
6+ user : " 1000:1000 " # Your user ID : Your group ID
77 networks :
88 - global
99 - local
1010 environment :
1111 - PASSWORD=${PASSWORD}
12- - DOCKER_USER =${USER}
12+ - CONTAINER_USER =${USER}
1313 volumes :
1414 - /var/run/docker.sock:/var/run/docker.sock
1515 - ${DATA_DIR}/code-server:/home/coder
File renamed without changes.
Original file line number Diff line number Diff line change @@ -23,16 +23,6 @@ RUN apt update \
2323 && dpkg -i code-server_${CODE_SERVER_VERSION}_amd64.deb && rm -f code-server_${CODE_SERVER_VERSION}_amd64.deb \
2424 && rm -rf /var/lib/apt/lists/*
2525
26- RUN mkdir -p /etc/apt/keyrings \
27- && curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
28- && echo \
29- "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
30- $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
31-
32- RUN apt update \
33- && apt install \
34- docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
35-
3626RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen && locale-gen
3727ENV LANG en_US.UTF-8
3828
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ if [ ! -d /home/coder/workspace ]; then
66 mkdir -p /home/coder/workspace
77fi
88
9- # If DOCKER_USER is set and if user doesn't exist already, switch container's user to match host's user
10- if [ " ${DOCKER_USER -} " ] && ! grep -q " ^$DOCKER_USER :" /etc/passwd; then
11- echo " $DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
12- sudo usermod --login " $DOCKER_USER " coder
13- sudo groupmod -n " $DOCKER_USER " coder
14- USER=" $DOCKER_USER "
9+ # If CONTAINER_USER is set and if user doesn't exist already, switch container's user to match host's user
10+ if [ " ${CONTAINER_USER -} " ] && ! grep -q " ^$CONTAINER_USER :" /etc/passwd; then
11+ echo " $CONTAINER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
12+ sudo usermod --login " $CONTAINER_USER " coder
13+ sudo groupmod -n " $CONTAINER_USER " coder
14+ USER=" $CONTAINER_USER "
1515 sudo sed -i " /coder/d" /etc/sudoers.d/nopasswd
1616fi
1717
You can’t perform that action at this time.
0 commit comments