Merge pull request #422 from linuxserver/code-server-powershell-s6v3

switch to hybrid (code-server-powershell)
This commit is contained in:
aptalca 2022-09-04 21:19:16 -04:00 committed by GitHub
commit 103140796f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# PowerShell - Docker mod for code-server
# PowerShell - Docker mod for code-server/openvscode-server
This mod adds PowerShell to code-server, to be installed/updated during container start.
This mod adds PowerShell to code-server/openvscode-server, to be installed/updated during container start.
In code-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-powershell`
In code-server/openvscode-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-powershell`
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:code-server-powershell|linuxserver/mods:code-server-mod2`

View File

@ -0,0 +1,29 @@
#!/usr/bin/with-contenv bash
ARCH=$(uname -m)
source /etc/lsb-release
if [ -f "/powershell/powershell_${ARCH}.tar.gz" ]; then
echo "Installing PowerShell"
if [ "${DISTRIB_CODENAME}" == "bionic" ]; then
echo "\
libicu60 \
libunwind8" >> /mod-repo-packages-to-install.list
elif [ "${DISTRIB_CODENAME}" == "focal" ]; then
echo "\
libicu66 \
libunwind8" >> /mod-repo-packages-to-install.list
elif [ "${DISTRIB_CODENAME}" == "jammy" ]; then
echo "\
libicu70 \
libunwind8" >> /mod-repo-packages-to-install.list
fi
tar xf "/powershell/powershell_${ARCH}.tar.gz" -C /powershell
rm -rf \
/powershell/powershell_x86_64.tar.gz \
/powershell/powershell_armv7l.tar.gz \
/powershell/powershell_aarch64.tar.gz
ln -s /powershell/pwsh /usr/bin/pwsh
else
echo "PowerShell already installed, skipping"
fi

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-mod-code-server-powershell-add-package/run