Skip to content

Commit b535184

Browse files
committed
Update docs, fix styling
1 parent 37b6825 commit b535184

File tree

7 files changed

+175
-173
lines changed

7 files changed

+175
-173
lines changed

Dockerfile

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ LABEL maintainer="aptalca"
1111
ENV HOME="/config"
1212

1313
RUN \
14-
echo "**** install node repo ****" && \
15-
apt-get update && \
16-
apt-get install -y \
17-
gnupg && \
18-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20-
> /etc/apt/sources.list.d/nodesource.list && \
21-
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22-
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23-
> /etc/apt/sources.list.d/yarn.list && \
24-
echo "**** install build dependencies ****" && \
25-
apt-get update && \
26-
apt-get install -y \
27-
build-essential \
28-
libx11-dev \
29-
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
32-
echo "**** install runtime dependencies ****" && \
33-
apt-get install -y \
34-
git \
35-
jq \
36-
nano \
37-
net-tools \
38-
nodejs \
39-
sudo \
40-
yarn && \
41-
echo "**** install code-server ****" && \
42-
if [ -z ${CODE_RELEASE+x} ]; then \
43-
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44-
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45-
fi && \
46-
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47-
yarn config set network-timeout 600000 -g && \
48-
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49-
yarn cache clean && \
50-
echo "**** clean up ****" && \
51-
apt-get purge --auto-remove -y \
52-
build-essential \
53-
libx11-dev \
54-
libxkbfile-dev \
55-
libsecret-1-dev \
56-
pkg-config && \
57-
apt-get clean && \
58-
rm -rf \
59-
/tmp/* \
60-
/var/lib/apt/lists/* \
61-
/var/tmp/*
14+
echo "**** install node repo ****" && \
15+
apt-get update && \
16+
apt-get install -y \
17+
gnupg && \
18+
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19+
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20+
> /etc/apt/sources.list.d/nodesource.list && \
21+
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22+
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23+
> /etc/apt/sources.list.d/yarn.list && \
24+
echo "**** install build dependencies ****" && \
25+
apt-get update && \
26+
apt-get install -y \
27+
build-essential \
28+
libx11-dev \
29+
libxkbfile-dev \
30+
libsecret-1-dev \
31+
pkg-config && \
32+
echo "**** install runtime dependencies ****" && \
33+
apt-get install -y \
34+
git \
35+
jq \
36+
nano \
37+
net-tools \
38+
nodejs \
39+
sudo \
40+
yarn && \
41+
echo "**** install code-server ****" && \
42+
if [ -z ${CODE_RELEASE+x} ]; then \
43+
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44+
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45+
fi && \
46+
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47+
yarn config set network-timeout 600000 -g && \
48+
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49+
yarn cache clean && \
50+
echo "**** clean up ****" && \
51+
apt-get purge --auto-remove -y \
52+
build-essential \
53+
libx11-dev \
54+
libxkbfile-dev \
55+
libsecret-1-dev \
56+
pkg-config && \
57+
apt-get clean && \
58+
rm -rf \
59+
/tmp/* \
60+
/var/lib/apt/lists/* \
61+
/var/tmp/*
6262

6363
# add local files
6464
COPY /root /

Dockerfile.aarch64

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ LABEL maintainer="aptalca"
1111
ENV HOME="/config"
1212

1313
RUN \
14-
echo "**** install node repo ****" && \
15-
apt-get update && \
16-
apt-get install -y \
17-
gnupg && \
18-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20-
> /etc/apt/sources.list.d/nodesource.list && \
21-
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22-
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23-
> /etc/apt/sources.list.d/yarn.list && \
24-
echo "**** install build dependencies ****" && \
25-
apt-get update && \
26-
apt-get install -y \
27-
build-essential \
28-
libx11-dev \
29-
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
32-
echo "**** install runtime dependencies ****" && \
33-
apt-get install -y \
34-
git \
35-
jq \
36-
nano \
37-
net-tools \
38-
nodejs \
39-
sudo \
40-
yarn && \
41-
echo "**** install code-server ****" && \
42-
if [ -z ${CODE_RELEASE+x} ]; then \
43-
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44-
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45-
fi && \
46-
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47-
yarn config set network-timeout 600000 -g && \
48-
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49-
yarn cache clean && \
50-
echo "**** clean up ****" && \
51-
apt-get purge --auto-remove -y \
52-
build-essential \
53-
libx11-dev \
54-
libxkbfile-dev \
55-
libsecret-1-dev \
56-
pkg-config && \
57-
apt-get clean && \
58-
rm -rf \
59-
/tmp/* \
60-
/var/lib/apt/lists/* \
61-
/var/tmp/*
14+
echo "**** install node repo ****" && \
15+
apt-get update && \
16+
apt-get install -y \
17+
gnupg && \
18+
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19+
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20+
> /etc/apt/sources.list.d/nodesource.list && \
21+
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22+
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23+
> /etc/apt/sources.list.d/yarn.list && \
24+
echo "**** install build dependencies ****" && \
25+
apt-get update && \
26+
apt-get install -y \
27+
build-essential \
28+
libx11-dev \
29+
libxkbfile-dev \
30+
libsecret-1-dev \
31+
pkg-config && \
32+
echo "**** install runtime dependencies ****" && \
33+
apt-get install -y \
34+
git \
35+
jq \
36+
nano \
37+
net-tools \
38+
nodejs \
39+
sudo \
40+
yarn && \
41+
echo "**** install code-server ****" && \
42+
if [ -z ${CODE_RELEASE+x} ]; then \
43+
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44+
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45+
fi && \
46+
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47+
yarn config set network-timeout 600000 -g && \
48+
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49+
yarn cache clean && \
50+
echo "**** clean up ****" && \
51+
apt-get purge --auto-remove -y \
52+
build-essential \
53+
libx11-dev \
54+
libxkbfile-dev \
55+
libsecret-1-dev \
56+
pkg-config && \
57+
apt-get clean && \
58+
rm -rf \
59+
/tmp/* \
60+
/var/lib/apt/lists/* \
61+
/var/tmp/*
6262

6363
# add local files
6464
COPY /root /

Dockerfile.armhf

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ LABEL maintainer="aptalca"
1111
ENV HOME="/config"
1212

1313
RUN \
14-
echo "**** install node repo ****" && \
15-
apt-get update && \
16-
apt-get install -y \
17-
gnupg && \
18-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19-
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20-
> /etc/apt/sources.list.d/nodesource.list && \
21-
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22-
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23-
> /etc/apt/sources.list.d/yarn.list && \
24-
echo "**** install build dependencies ****" && \
25-
apt-get update && \
26-
apt-get install -y \
27-
build-essential \
28-
libx11-dev \
29-
libxkbfile-dev \
30-
libsecret-1-dev \
31-
pkg-config && \
32-
echo "**** install runtime dependencies ****" && \
33-
apt-get install -y \
34-
git \
35-
jq \
36-
nano \
37-
net-tools \
38-
nodejs \
39-
sudo \
40-
yarn && \
41-
echo "**** install code-server ****" && \
42-
if [ -z ${CODE_RELEASE+x} ]; then \
43-
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44-
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45-
fi && \
46-
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47-
yarn config set network-timeout 600000 -g && \
48-
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49-
yarn cache clean && \
50-
echo "**** clean up ****" && \
51-
apt-get purge --auto-remove -y \
52-
build-essential \
53-
libx11-dev \
54-
libxkbfile-dev \
55-
libsecret-1-dev \
56-
pkg-config && \
57-
apt-get clean && \
58-
rm -rf \
59-
/tmp/* \
60-
/var/lib/apt/lists/* \
61-
/var/tmp/*
14+
echo "**** install node repo ****" && \
15+
apt-get update && \
16+
apt-get install -y \
17+
gnupg && \
18+
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19+
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20+
> /etc/apt/sources.list.d/nodesource.list && \
21+
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
22+
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
23+
> /etc/apt/sources.list.d/yarn.list && \
24+
echo "**** install build dependencies ****" && \
25+
apt-get update && \
26+
apt-get install -y \
27+
build-essential \
28+
libx11-dev \
29+
libxkbfile-dev \
30+
libsecret-1-dev \
31+
pkg-config && \
32+
echo "**** install runtime dependencies ****" && \
33+
apt-get install -y \
34+
git \
35+
jq \
36+
nano \
37+
net-tools \
38+
nodejs \
39+
sudo \
40+
yarn && \
41+
echo "**** install code-server ****" && \
42+
if [ -z ${CODE_RELEASE+x} ]; then \
43+
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
44+
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
45+
fi && \
46+
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
47+
yarn config set network-timeout 600000 -g && \
48+
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
49+
yarn cache clean && \
50+
echo "**** clean up ****" && \
51+
apt-get purge --auto-remove -y \
52+
build-essential \
53+
libx11-dev \
54+
libxkbfile-dev \
55+
libsecret-1-dev \
56+
pkg-config && \
57+
apt-get clean && \
58+
rm -rf \
59+
/tmp/* \
60+
/var/lib/apt/lists/* \
61+
/var/tmp/*
6262

6363
# add local files
6464
COPY /root /

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Container images are configured using parameters passed at runtime (such as thos
151151
| `-e HASHED_PASSWORD=` | Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below. |
152152
| `-e SUDO_PASSWORD=password` | If this optional variable is set, user will have sudo access in the code-server terminal with the specified password. |
153153
| `-e SUDO_PASSWORD_HASH=` | Optionally set sudo password via hash (takes priority over `SUDO_PASSWORD` var). Format is `$type$salt$hashed`. |
154-
| `-e PROXY_DOMAIN=code-server.my.domain` | If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#sub-domains) |
154+
| `-e PROXY_DOMAIN=code-server.my.domain` | If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains) |
155155
| `-v /config` | Contains all relevant configuration files. |
156156

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

264264
## Versions
265265

266+
* **08.05.21:** - Fix doc link
266267
* **04.02.20:** - Allow setting gui password via hash using env var `HASHED_PASSWORD`.
267268
* **23.12.20:** - Allow setting sudo password via hash using env var `SUDO_PASSWORD_HASH`.
268269
* **29.05.20:** - Add --domain-proxy support.

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ opt_param_env_vars:
5151
- { env_var: "HASHED_PASSWORD", env_value: "", desc: "Optional web gui password, overrides `PASSWORD`, instructions on how to create it is below." }
5252
- { 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." }
5353
- { 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`." }
54-
- { env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/doc/FAQ.md#sub-domains)" }
54+
- { env_var: "PROXY_DOMAIN", env_value: "code-server.my.domain", desc: "If this optional variable is set, this domain will be proxied for subdomain proxying. See [Documentation](https://github.com/cdr/code-server/blob/master/docs/FAQ.md#sub-domains)" }
5555

5656
optional_block_1: false
5757
optional_block_1_items: ""
@@ -75,6 +75,7 @@ app_setup_block: |
7575
7676
# changelog
7777
changelogs:
78+
- { date: "08.05.21:", desc: "Fix doc link" }
7879
- { date: "04.02.20:", desc: "Allow setting gui password via hash using env var `HASHED_PASSWORD`." }
7980
- { date: "23.12.20:", desc: "Allow setting sudo password via hash using env var `SUDO_PASSWORD_HASH`." }
8081
- { date: "29.05.20:", desc: "Add --domain-proxy support." }

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
mkdir -p /config/{extensions,data,workspace,.ssh}
44

55
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
6-
echo "setting up sudo access"
7-
if ! grep -q 'abc' /etc/sudoers; then
8-
echo "adding abc to sudoers"
9-
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
10-
fi
11-
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
12-
echo "setting sudo password using sudo password hash"
13-
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
14-
else
15-
echo "setting sudo password using SUDO_PASSWORD env var"
16-
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
17-
fi
6+
echo "setting up sudo access"
7+
if ! grep -q 'abc' /etc/sudoers; then
8+
echo "adding abc to sudoers"
9+
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
10+
fi
11+
if [ -n "${SUDO_PASSWORD_HASH}" ]; then
12+
echo "setting sudo password using sudo password hash"
13+
sed -i "s|^abc:\!:|abc:${SUDO_PASSWORD_HASH}:|" /etc/shadow
14+
else
15+
echo "setting sudo password using SUDO_PASSWORD env var"
16+
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
17+
fi
1818
fi
1919

2020
# permissions
2121
chown -R abc:abc \
22-
/config
22+
/config

0 commit comments

Comments
 (0)