Compare commits

..

11 Commits

Author SHA1 Message Date
LinuxServer-CI
84ea523a92 Bot Updating Package Versions 2019-07-14 10:16:23 +01:00
chbmb
04a8319b15 Merge pull request #5 from linuxserver/aptalca-patch-2
grep shouldn't be this confusing
2019-07-10 00:06:07 +01:00
aptalca
ad0813af8b grep shouldn't be this confusing 2019-07-09 18:55:11 -04:00
chbmb
43281e335f Merge pull request #4 from linuxserver/aptalca-patch-1
fix if grep
2019-07-09 23:40:25 +01:00
aptalca
88d09c973d fix if grep 2019-07-09 18:32:57 -04:00
LinuxServer-CI
97181b11c9 Bot Updating Package Versions 2019-07-09 18:14:41 -04:00
chbmb
6552a9c9ed Merge pull request #3 from linuxserver/sudo
optional sudo password via env variable
2019-07-09 23:13:12 +01:00
aptalca
59cbe64f20 fix typo 2019-07-09 17:43:45 -04:00
aptalca
b722cd6c8f optional sudo password via env variable 2019-07-09 17:29:50 -04:00
LinuxServer-CI
886c4797f9 Bot Updating Package Versions 2019-07-07 05:17:53 -04:00
LinuxServer-CI
b28107069f Bot Updating Templated Files 2019-07-07 11:16:02 +02:00
5 changed files with 30 additions and 10 deletions

View File

@@ -15,7 +15,8 @@ RUN \
apt-get install -y \
git \
nano \
net-tools && \
net-tools \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \

View File

@@ -58,6 +58,7 @@ docker create \
-e PGID=1000 \
-e TZ=Europe/London \
-e PASSWORD=password `#optional` \
-e SUDO_PASSWORD=password `#optional` \
-p 8443:8443 \
-v /path/to/appdata/config:/config \
--restart unless-stopped \
@@ -81,6 +82,7 @@ services:
- PGID=1000
- TZ=Europe/London
- PASSWORD=password #optional
- SUDO_PASSWORD=password #optional
volumes:
- /path/to/appdata/config:/config
ports:
@@ -98,7 +100,8 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-e PASSWORD=password` | Optional web gui password, if not provided, there will be no auth |
| `-e PASSWORD=password` | Optional web gui password, if not provided, there will be no auth. |
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
| `-v /config` | Contains all relevant configuration files. |
## User / Group Identifiers
@@ -166,6 +169,9 @@ Below are the instructions for updating containers:
containrrr/watchtower \
--run-once code-server
```
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.
* You can also remove the old dangling images: `docker image prune`
## Building locally
@@ -189,5 +195,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **09.07.19:** - Add optional sudo access.
* **01.07.19:** - Add nano.
* **24.06.19:** - Initial Release.

View File

@@ -3,9 +3,9 @@ apt1.6.11
apt-utils1.6.11
base-files10.1ubuntu2.4
base-passwd3.5.44
bash4.4.18-2ubuntu1.1
bash4.4.18-2ubuntu1.2
bsdutils1:2.31.1-0.4ubuntu3.3
bzip21.0.6-8.1
bzip21.0.6-8.1ubuntu0.2
ca-certificates20180409
coreutils8.28-1ubuntu1
curl7.58.0-2ubuntu3.7
@@ -36,7 +36,7 @@ libaudit11:2.8.2-1ubuntu1
libaudit-common1:2.8.2-1ubuntu1
libblkid12.31.1-0.4ubuntu3.3
libbsd00.8.7-1
libbz2-1.01.0.6-8.1
libbz2-1.01.0.6-8.1ubuntu0.2
libc62.27-3ubuntu1
libcap-ng00.7.7-3.1
libc-bin2.27-3ubuntu1
@@ -105,10 +105,10 @@ libss21.44.1-1ubuntu1.1
libssl1.0.01.0.2n-1ubuntu5.3
libssl1.11.1.1-1ubuntu2.1~18.04.3
libstdc++68.3.0-6ubuntu1~18.04.1
libsystemd0237-3ubuntu10.23
libsystemd0237-3ubuntu10.24
libtasn1-64.13-2
libtinfo56.1-1ubuntu1.18.04
libudev1237-3ubuntu10.23
libudev1237-3ubuntu10.24
libunistring20.9.9-0ubuntu2
libuuid12.31.1-0.4ubuntu3.3
libwind0-heimdal7.5.0+dfsg-1
@@ -142,9 +142,10 @@ procps2:3.3.12-3ubuntu1.1
publicsuffix20180223.1310-1
sed4.4-2
sensible-utils0.0.12
sudo1.8.21p2-3ubuntu1
sysvinit-utils2.88dsf-59.10ubuntu1
tar1.29b-2ubuntu0.1
tzdata2019a-0ubuntu0.18.04
tzdata2019b-0ubuntu0.18.04
ubuntu-keyring2018.09.18.1~18.04.0
util-linux2.31.1-0.4ubuntu3.3
xauth1:1.0.10-1

View File

@@ -45,7 +45,8 @@ param_env_vars:
# optional container parameters
opt_param_usage_include_env: true
opt_param_env_vars:
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if not provided, there will be no auth"}
- { env_var: "PASSWORD", env_value: "password", desc: "Optional web gui password, if not provided, there will be no auth."}
- { env_var: "SUDO_PASSWORD", env_value: "password", desc: "If this optional variable is set, user will have sudo access in the code-server terminal with the specified password."}
optional_block_1: false
optional_block_1_items: ""
@@ -64,5 +65,6 @@ app_setup_block: |
# changelog
changelogs:
- { date: "09.07.19:", desc: "Add optional sudo access." }
- { date: "01.07.19:", desc: "Add nano." }
- { date: "24.06.19:", desc: "Initial Release." }

View File

@@ -2,7 +2,16 @@
mkdir -p /config/{extensions,data,workspace,.ssh}
if [ -n "${SUDO_PASSWORD}" ]; then
echo "setting up sudo access"
if ! grep -q 'abc' /etc/sudoers; then
echo "adding abc to sudoers"
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
fi
echo "setting sudo password"
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
fi
# permissions
chown -R abc:abc \
/opt/code-server \
/config