Compare commits

..

15 Commits

Author SHA1 Message Date
d5e345fb48 Adding to bash the functionality to install extensions from array. Updating to version 1.0.15 2023-08-29 12:56:31 +00:00
e0bb4bfa2f Trying to fix entrypont.sh Updating to version 1.0.14 2023-08-27 04:53:21 +00:00
c90139bbcc Trying to fix entrypoint.sh Updating to version 1.0.13. 2023-08-27 03:50:03 +00:00
3dc1c03a0f Trying to fix entrypoint.sh Updating to version 1.0.12 2023-08-27 00:29:06 +00:00
f7c889e3c9 Trying to fix entrypoint.sh Updating to version 1.0.11 2023-08-27 00:09:37 +00:00
115d25613c Trying to fix entrypoint.sh Updating to version 1.0.10 2023-08-26 23:35:03 +00:00
eaa8cc886d Trying to fix entrypoint.sh Updating to version 1.0.9 2023-08-26 18:55:25 +00:00
ff85878b7e Trying to fix entrypoint.sh Updating to version 1.0.8 2023-08-26 01:20:38 +00:00
c189c21474 Trying to fix entrypoint.sh Updating to version 1.0.7 2023-08-25 18:20:22 +00:00
49ffeccf7e Trying to fix entrypoint.sh Updating to version 1.0.6 2023-08-25 17:51:48 +00:00
72cc00272c Trying to fix entrypoint.sh Updating to version 1.0.5 2023-08-25 17:34:49 +00:00
1e044e4959 Trying to fix entrypoint.sh Updating to version 1.0.4 2023-08-25 17:18:17 +00:00
4bcf68cd67 Trying to fix entrypoint.sh Updating to version 1.0.3 2023-08-25 16:55:29 +00:00
711b77fa2c Trying to fix entrypoint.sh Updating to version 1.0.2 2023-08-25 16:43:00 +00:00
9c4f9247f8 Fixing entrypoint.sh Updating to version 1.0.1 2023-08-25 16:29:22 +00:00
3 changed files with 32 additions and 8 deletions

View File

@ -3,7 +3,6 @@ FROM ubuntu:22.04
# Update the package list, install sudo, create a non-root user, and grant password-less sudo permissions # Update the package list, install sudo, create a non-root user, and grant password-less sudo permissions
RUN apt update RUN apt update
RUN apt install -y sudo RUN apt install -y sudo
RUN addgroup nonroot
RUN sudo apt-get update RUN sudo apt-get update
#Instalando Curl #Instalando Curl

View File

@ -1,6 +1,31 @@
#!/bin/sh #!/bin/bash
exec [[ -z "${HOME_USER}" ]] && adduser --disabled-password --gecos "" vscode \ if [[ -z "${HOME_USER}" ]]; then
echo 'vscode ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \ HOME_USER="vscode"
|| adduser --disabled-password --gecos "" ${HOME_USER} \ fi
echo '${HOME_USER} ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
exec [[ -z "${VSCODE_TUNNEL_NAME}" ]] && code tunnel --accept-server-license-terms || code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME} addgroup nonroot
adduser --disabled-password --gecos "" ${HOME_USER}
echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Check if the data.json file exists
if [ -f "/home/extensions.json" ]; then
# Read the JSON file into a variable
jsonExtensions=$(cat /home/extensions.json)
# Use jq to extract the array elements
extensions=$(echo $jsonExtensions | jq -r '.[]')
# Loop through the extensions and process each element
for extension in $extensions; do
echo "Installing extension: $extension"
sudo su - ${HOME_USER} -c "code --install-extension $extension"
done
else
echo "File extensions.json not found"
fi
if [[ -z "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms"
else
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}"
fi

View File

@ -1 +1 @@
1.0.0 1.0.15