From 59aaae801d17fed17332546c0f68e7c1789e38e0 Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 29 Nov 2021 21:09:33 -0500 Subject: [PATCH] Create `.profile` and `.bashrc` for the user --- README.md | 3 +++ readme-vars.yml | 4 ++++ root/etc/cont-init.d/30-config | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 17763f5..9616c13 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ git config --global user.name "username" git config --global user.email "email address" ``` +When reverse proxied through SWAG, custom services running on specific ports inside openvscode-server can be accessed at `https://PORT.openvscode-server.domain.com` very much like how code-server's port proxy function is handled. For that, a wildcard CNAME `*.openvscode-server.domain.com` needs to be created and the SWAG cert needs to cover those subdomains. + ## Usage Here are some example snippets to help you get started creating a container. @@ -243,5 +245,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **29.11.21:** - Create `.profile` and `.bashrc` for the user. * **29.11.21:** - Release `insiders` tag. * **28.11.21:** - Initial Release. diff --git a/readme-vars.yml b/readme-vars.yml index 8fb0802..629d21f 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -54,8 +54,12 @@ app_setup_block: | git config --global user.email "email address" ``` + When reverse proxied through SWAG, custom services running on specific ports inside openvscode-server can be accessed at `https://PORT.openvscode-server.domain.com` very much like how code-server's port proxy function is handled. For that, a wildcard CNAME `*.openvscode-server.domain.com` needs to be created and the SWAG cert needs to cover those subdomains. + + # changelog changelogs: + - { date: "29.11.21:", desc: "Create `.profile` and `.bashrc` for the user." } - { date: "29.11.21:", desc: "Release `insiders` tag." } - { date: "28.11.21:", desc: "Initial Release." } diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index b76f75e..9cfe88d 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -17,6 +17,11 @@ if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then fi fi +[[ ! -f /config/.bashrc ]] && \ + cp /root/.bashrc /config/.bashrc +[[ ! -f /config/.profile ]] && \ + cp /root/.profile /config/.profile + # permissions if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then CORES=$(nproc --all)