Skip to content

Commit 3463240

Browse files
authored
Merge pull request #6 from linuxserver/insiders-perms
2 parents ca8fbaf + 50b10d8 commit 3463240

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ services:
9999
- TZ=Europe/London
100100
- CONNECTION_TOKEN=supersecrettoken #optional
101101
- CONNECTION_SECRET= #optional
102+
- SUDO_PASSWORD=password #optional
103+
- SUDO_PASSWORD_HASH= #optional
102104
volumes:
103105
- /path/to/appdata/config:/config
104106
ports:
@@ -116,6 +118,8 @@ docker run -d \
116118
-e TZ=Europe/London \
117119
-e CONNECTION_TOKEN=supersecrettoken `#optional` \
118120
-e CONNECTION_SECRET= `#optional` \
121+
-e SUDO_PASSWORD=password `#optional` \
122+
-e SUDO_PASSWORD_HASH= `#optional` \
119123
-p 3000:3000 \
120124
-v /path/to/appdata/config:/config \
121125
--restart unless-stopped \
@@ -134,6 +138,8 @@ Container images are configured using parameters passed at runtime (such as thos
134138
| `-e TZ=Europe/London` | Specify a timezone to use. |
135139
| `-e CONNECTION_TOKEN=supersecrettoken` | Optional security token for accessing the Web UI. |
136140
| `-e CONNECTION_SECRET=` | Optional path to a file inside the container that contains the security token for accessing the Web UI (ie. `/path/to/file`). Overrides `CONNECTION_TOKEN`. |
141+
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the openvscode-server terminal with the specified password. |
142+
| `-e SUDO_PASSWORD_HASH=` | Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`. |
137143
| `-v /config` | Contains all relevant configuration files. |
138144

139145
## Environment variables from files (Docker secrets)
@@ -245,6 +251,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
245251

246252
## Versions
247253

254+
* **30.11.21:** - Fix app folder permissions, add the optional sudo password vars.
248255
* **29.11.21:** - Create `.profile` and `.bashrc` for the user.
249256
* **29.11.21:** - Release `insiders` tag.
250257
* **28.11.21:** - Initial Release.

readme-vars.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ opt_param_usage_include_env: true
3737
opt_param_env_vars:
3838
- { env_var: "CONNECTION_TOKEN", env_value: "supersecrettoken", desc: "Optional security token for accessing the Web UI." }
3939
- { env_var: "CONNECTION_SECRET", env_value: "", desc: "Optional path to a file inside the container that contains the security token for accessing the Web UI (ie. `/path/to/file`). Overrides `CONNECTION_TOKEN`." }
40+
- { env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the openvscode-server terminal with the specified password." }
41+
- { env_var: "SUDO_PASSWORD_HASH", env_value: "", desc: "Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`." }
4042

4143
optional_block_1: false
4244
optional_block_1_items: ""
@@ -60,6 +62,7 @@ app_setup_block: |
6062
6163
# changelog
6264
changelogs:
65+
- { date: "30.11.21:", desc: "Fix app folder permissions, add the optional sudo password vars." }
6366
- { date: "29.11.21:", desc: "Create `.profile` and `.bashrc` for the user." }
6467
- { date: "29.11.21:", desc: "Release `insiders` tag." }
6568
- { date: "28.11.21:", desc: "Initial Release." }

root/etc/cont-init.d/30-config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@ if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
3434

3535
echo "setting permissions::workspace"
3636
chown abc:abc /config/workspace
37+
echo "setting permissions::app"
38+
chown -R abc:abc /app/openvscode-server
3739
else
3840
# Set permissions on data mount
3941
# do not decend into the workspace
4042
chown -R abc:abc "$(ls /config -I workspace)"
4143
chown abc:abc /config/workspace
44+
chown -R abc:abc /app/openvscode-server
4245
fi
4346
chmod 700 /config/.ssh
4447
if [ -n "$(ls -A /config/.ssh)" ]; then

0 commit comments

Comments
 (0)