Skip to content

Code Server Customizations ​

About ​

The Arkanum image itself depends on the underlying coder/code-server project and the container image provided by linxuserver/docker-code-server. To be able to add features and change the behaviour we need to customize either the code-server itself of the docker image creation.

These are the custimzations we added to build the arkanum server and the arkanum-cli :

Bash Aliases ​

You can use the alias summon to interact with the code-server instance.

Product Images ​

We replaces the product image files to math the arkanum branding. See the code-server/media folder for the used files.

Application Name ​

The code-server command provides the ability to change it's name in the title other places. We also use arkanum therefore.

Referenced Source Files ​

Dockerfile
WORKDIR /
# remove code-server specific files to override with branded values.
# changes product images + app name
RUN \
  rm -rf /app/code-server/src/browser/media && \
  rm -f /etc/s6-overlay/s6-rc.d/svc-code-server/run && \
  echo 'alias summon="code-server"' >> /etc/bash.bashrc

COPY code-server/media /app/code-server/src/browser/media
COPY code-server/root/etc/s6-overlay/s6-rc.d/svc-code-server/run /etc/s6-overlay/s6-rc.d/svc-code-server/run
bash
#!/usr/bin/with-contenv bash

if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
    AUTH="password"
else
    AUTH="none"
    echo "starting with no password"
fi

if [ -z ${PROXY_DOMAIN+x} ]; then
    PROXY_DOMAIN_ARG=""
else
    PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi

exec \
    s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
        s6-setuidgid abc \
            /app/code-server/bin/code-server \
                --bind-addr 0.0.0.0:8443 \
                --user-data-dir /config/data \
                --extensions-dir /config/extensions \
                --disable-telemetry \
                --auth "${AUTH}" \
                --app-name "Arkanum" \
                "${PROXY_DOMAIN_ARG}" \
                "${DEFAULT_WORKSPACE:-/config/workspace}"

Released under the AGPLv3 License.