mirror of
https://github.com/linuxserver/docker-code-server
synced 2025-06-26 18:27:40 +00:00
initial commit of mod-python2
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
mkdir -p /config/{extensions,data,workspace,.ssh}
|
||||
|
||||
if [ -n "${SUDO_PASSWORD}" ]; then
|
||||
echo "setting up sudo access"
|
||||
if ! grep -q 'abc' /etc/sudoers; then
|
||||
echo "adding abc to sudoers"
|
||||
echo "abc ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
||||
fi
|
||||
echo "setting sudo password"
|
||||
echo -e "${SUDO_PASSWORD}\n${SUDO_PASSWORD}" | passwd abc
|
||||
fi
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config
|
||||
5
root/etc/cont-init.d/99-python2
Normal file
5
root/etc/cont-init.d/99-python2
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt update && apt install -y \
|
||||
python \
|
||||
python-pip
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -n "${PASSWORD}" ]; then
|
||||
AUTH="password"
|
||||
else
|
||||
AUTH="none"
|
||||
echo "starting with no password"
|
||||
fi
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc \
|
||||
/usr/bin/code-server \
|
||||
--port 8443 \
|
||||
--user-data-dir /config/data \
|
||||
--extensions-dir /config/extensions \
|
||||
--disable-telemetry \
|
||||
--disable-updates \
|
||||
--auth "${AUTH}" \
|
||||
/config/workspace
|
||||
Reference in New Issue
Block a user