mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
Merge pull request #422 from linuxserver/code-server-powershell-s6v3
switch to hybrid (code-server-powershell)
This commit is contained in:
commit
103140796f
@ -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`
|
||||
|
||||
29
root/etc/s6-overlay/s6-rc.d/init-mod-code-server-powershell-add-package/run
Executable file
29
root/etc/s6-overlay/s6-rc.d/init-mod-code-server-powershell-add-package/run
Executable 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
|
||||
@ -0,0 +1 @@
|
||||
oneshot
|
||||
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-code-server-powershell-add-package/run
|
||||
Loading…
x
Reference in New Issue
Block a user