Compare commits
26 commits
automated-
...
main
Author | SHA1 | Date | |
---|---|---|---|
768d4c8398 | |||
0a4f338966 | |||
297c9da2d8 | |||
f0abbb5ccd | |||
fd426c9ceb | |||
dfb174d4e4 | |||
|
3ea4d6bbd7 | ||
|
def3a41f57 | ||
|
d53b9d1816 | ||
|
710103a638 | ||
|
7324b6d03c | ||
|
d4ecc7be06 | ||
|
719901a1b4 | ||
|
4c2c9f7b95 | ||
|
e645120a39 | ||
|
1155a9906b | ||
|
36a3604b90 | ||
|
4fca96b5e8 | ||
|
0d7ad7c5fc | ||
|
90a9b1d604 | ||
|
c3f9105048 | ||
|
04cb7d1e79 | ||
|
cf92754bf4 | ||
|
803ec6e0e5 | ||
|
0599c63f8f | ||
|
3aad9a72f4 |
44 changed files with 268 additions and 166 deletions
|
@ -1,18 +1,17 @@
|
||||||
{
|
{
|
||||||
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
|
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18",
|
||||||
"remoteUser": "node",
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"extensions": [
|
|
||||||
"mads-hartmann.bash-ide-vscode"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "npm install -g @devcontainers/cli",
|
"postCreateCommand": "npm install -g @devcontainers/cli",
|
||||||
"hostRequirements": {
|
"hostRequirements": {
|
||||||
"cpus": 4
|
"cpus": 4
|
||||||
|
},
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"mads-hartmann.bash-ide-vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -35,8 +35,11 @@ jobs:
|
||||||
git add src/dotnet/scripts/vendor/dotnet-install.sh
|
git add src/dotnet/scripts/vendor/dotnet-install.sh
|
||||||
git commit -m 'Automated dotnet-install script update' || export NO_UPDATES=true
|
git commit -m 'Automated dotnet-install script update' || export NO_UPDATES=true
|
||||||
|
|
||||||
# Push
|
# Bump version and push
|
||||||
if [ "$NO_UPDATES" != "true" ] ; then
|
if [ "$NO_UPDATES" != "true" ] ; then
|
||||||
|
echo "$(jq --indent 4 '.version = (.version | split(".") | map(tonumber) | .[2] += 1 | join("."))' src/dotnet/devcontainer-feature.json)" > src/dotnet/devcontainer-feature.json
|
||||||
|
git add src/dotnet/devcontainer-feature.json
|
||||||
|
git commit -m 'Bump version'
|
||||||
git push origin "$branch"
|
git push origin "$branch"
|
||||||
gh api \
|
gh api \
|
||||||
--method POST \
|
--method POST \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "aws-cli",
|
"id": "aws-cli",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"name": "AWS CLI",
|
"name": "AWS CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/aws-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/aws-cli",
|
||||||
"description": "Installs the AWS CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs the AWS CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
|
|
@ -50,21 +50,6 @@ if [ "$(id -u)" -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
|
@ -89,9 +74,6 @@ check_packages curl ca-certificates gnupg2 dirmngr unzip
|
||||||
verify_aws_cli_gpg_signature() {
|
verify_aws_cli_gpg_signature() {
|
||||||
local filePath=$1
|
local filePath=$1
|
||||||
local sigFilePath=$2
|
local sigFilePath=$2
|
||||||
|
|
||||||
get_common_setting AWSCLI_GPG_KEY
|
|
||||||
get_common_setting AWSCLI_GPG_KEY_MATERIAL true
|
|
||||||
local awsGpgKeyring=aws-cli-public-key.gpg
|
local awsGpgKeyring=aws-cli-public-key.gpg
|
||||||
|
|
||||||
echo "${AWSCLI_GPG_KEY_MATERIAL}" | gpg --dearmor > "./${awsGpgKeyring}"
|
echo "${AWSCLI_GPG_KEY_MATERIAL}" | gpg --dearmor > "./${awsGpgKeyring}"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "azure-cli",
|
"id": "azure-cli",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"name": "Azure CLI",
|
"name": "Azure CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/azure-cli",
|
||||||
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs the Azure CLI along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
|
|
@ -32,21 +32,6 @@ fi
|
||||||
|
|
||||||
echo "Effective REMOTE_USER: ${_REMOTE_USER}"
|
echo "Effective REMOTE_USER: ${_REMOTE_USER}"
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
echo "Running apt-get update..."
|
echo "Running apt-get update..."
|
||||||
|
@ -110,7 +95,6 @@ install_using_apt() {
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
check_packages apt-transport-https curl ca-certificates gnupg2 dirmngr
|
check_packages apt-transport-https curl ca-certificates gnupg2 dirmngr
|
||||||
# Import key safely (new 'signed-by' method rather than deprecated apt-key approach) and install
|
# Import key safely (new 'signed-by' method rather than deprecated apt-key approach) and install
|
||||||
get_common_setting MICROSOFT_GPG_KEYS_URI
|
|
||||||
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
||||||
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/azure-cli/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/azure-cli.list
|
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/azure-cli/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/azure-cli.list
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "common-utils",
|
"id": "common-utils",
|
||||||
"version": "2.2.0",
|
"version": "2.3.1",
|
||||||
"name": "Common Utilities",
|
"name": "Common Utilities",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
||||||
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
||||||
|
|
|
@ -222,7 +222,9 @@ install_redhat_packages() {
|
||||||
package_list="${package_list} zsh"
|
package_list="${package_list} zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${package_list}" ]; then
|
||||||
${install_cmd} -y install ${package_list}
|
${install_cmd} -y install ${package_list}
|
||||||
|
fi
|
||||||
|
|
||||||
# Get to latest versions of all packages
|
# Get to latest versions of all packages
|
||||||
if [ "${UPGRADE_PACKAGES}" = "true" ]; then
|
if [ "${UPGRADE_PACKAGES}" = "true" ]; then
|
||||||
|
@ -421,6 +423,7 @@ fi
|
||||||
# Restore user .bashrc / .profile / .zshrc defaults from skeleton file if it doesn't exist or is empty
|
# Restore user .bashrc / .profile / .zshrc defaults from skeleton file if it doesn't exist or is empty
|
||||||
possible_rc_files=( ".bashrc" ".profile" )
|
possible_rc_files=( ".bashrc" ".profile" )
|
||||||
[ "$INSTALL_OH_MY_ZSH_CONFIG" == "true" ] && possible_rc_files+=('.zshrc')
|
[ "$INSTALL_OH_MY_ZSH_CONFIG" == "true" ] && possible_rc_files+=('.zshrc')
|
||||||
|
[ "$INSTALL_ZSH" == "true" ] && possible_rc_files+=('.zprofile')
|
||||||
for rc_file in "${possible_rc_files[@]}"; do
|
for rc_file in "${possible_rc_files[@]}"; do
|
||||||
if [ -f "/etc/skel/${rc_file}" ]; then
|
if [ -f "/etc/skel/${rc_file}" ]; then
|
||||||
if [ ! -e "${user_home}/${rc_file}" ] || [ ! -s "${user_home}/${rc_file}" ]; then
|
if [ ! -e "${user_home}/${rc_file}" ] || [ ! -s "${user_home}/${rc_file}" ]; then
|
||||||
|
@ -456,13 +459,19 @@ fi
|
||||||
|
|
||||||
# Optionally configure zsh and Oh My Zsh!
|
# Optionally configure zsh and Oh My Zsh!
|
||||||
if [ "${INSTALL_ZSH}" = "true" ]; then
|
if [ "${INSTALL_ZSH}" = "true" ]; then
|
||||||
|
if [ ! -f "${user_home}/.zprofile" ]; then
|
||||||
|
touch "${user_home}/.zprofile"
|
||||||
|
echo 'source $HOME/.profile' >> "${user_home}/.zprofile" # TODO: Reconsider adding '.profile' to '.zprofile'
|
||||||
|
chown ${USERNAME}:${group_name} "${user_home}/.zprofile"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
|
if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
|
||||||
if [ "${ADJUSTED_ID}" = "rhel" ]; then
|
if [ "${ADJUSTED_ID}" = "rhel" ]; then
|
||||||
global_rc_path="/etc/zshrc"
|
global_rc_path="/etc/zshrc"
|
||||||
else
|
else
|
||||||
global_rc_path="/etc/zsh/zshrc"
|
global_rc_path="/etc/zsh/zshrc"
|
||||||
fi
|
fi
|
||||||
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> /etc/zshrc
|
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
|
||||||
ZSH_ALREADY_INSTALLED="true"
|
ZSH_ALREADY_INSTALLED="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "docker-in-docker",
|
"id": "docker-in-docker",
|
||||||
"version": "2.5.0",
|
"version": "2.7.1",
|
||||||
"name": "Docker (Docker-in-Docker)",
|
"name": "Docker (Docker-in-Docker)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-in-docker",
|
||||||
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
|
"description": "Create child containers *inside* a container, independent from the host's docker instance. Installs Docker extension in the container along with needed CLIs.",
|
||||||
|
|
|
@ -57,21 +57,6 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
||||||
USERNAME=root
|
USERNAME=root
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
@ -137,8 +122,6 @@ architecture="$(dpkg --print-architecture)"
|
||||||
|
|
||||||
# Check if distro is supported
|
# Check if distro is supported
|
||||||
if [ "${USE_MOBY}" = "true" ]; then
|
if [ "${USE_MOBY}" = "true" ]; then
|
||||||
# 'get_common_setting' allows attribute to be updated remotely
|
|
||||||
get_common_setting DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES
|
|
||||||
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, either: (1) set feature option '\"moby\": false' , or (2) choose a compatible OS distribution"
|
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, either: (1) set feature option '\"moby\": false' , or (2) choose a compatible OS distribution"
|
||||||
err "Support distributions include: ${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}"
|
err "Support distributions include: ${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}"
|
||||||
|
@ -146,7 +129,6 @@ if [ "${USE_MOBY}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
||||||
else
|
else
|
||||||
get_common_setting DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES
|
|
||||||
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
||||||
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
||||||
|
@ -177,7 +159,6 @@ if [ "${USE_MOBY}" = "true" ]; then
|
||||||
cli_package_name="moby-cli"
|
cli_package_name="moby-cli"
|
||||||
|
|
||||||
# Import key safely and import Microsoft apt repo
|
# Import key safely and import Microsoft apt repo
|
||||||
get_common_setting MICROSOFT_GPG_KEYS_URI
|
|
||||||
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
||||||
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
|
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
|
||||||
else
|
else
|
||||||
|
@ -363,7 +344,6 @@ tee -a /usr/local/share/docker-init.sh > /dev/null \
|
||||||
<< 'EOF'
|
<< 'EOF'
|
||||||
dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAULT_ADDRESS_POOL=${DOCKER_DEFAULT_ADDRESS_POOL} $(cat << 'INNEREOF'
|
dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAULT_ADDRESS_POOL=${DOCKER_DEFAULT_ADDRESS_POOL} $(cat << 'INNEREOF'
|
||||||
# explicitly remove dockerd and containerd PID file to ensure that it can start properly if it was stopped uncleanly
|
# explicitly remove dockerd and containerd PID file to ensure that it can start properly if it was stopped uncleanly
|
||||||
# ie: docker kill <ID>
|
|
||||||
find /run /var/run -iname 'docker*.pid' -delete || :
|
find /run /var/run -iname 'docker*.pid' -delete || :
|
||||||
find /run /var/run -iname 'container*.pid' -delete || :
|
find /run /var/run -iname 'container*.pid' -delete || :
|
||||||
|
|
||||||
|
@ -444,6 +424,16 @@ dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAU
|
||||||
INNEREOF
|
INNEREOF
|
||||||
)"
|
)"
|
||||||
|
|
||||||
|
sudo_if() {
|
||||||
|
COMMAND="$*"
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
sudo $COMMAND
|
||||||
|
else
|
||||||
|
$COMMAND
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
retry_docker_start_count=0
|
retry_docker_start_count=0
|
||||||
docker_ok="false"
|
docker_ok="false"
|
||||||
|
|
||||||
|
@ -467,8 +457,12 @@ do
|
||||||
retry_count=`expr $retry_count + 1`
|
retry_count=`expr $retry_count + 1`
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "${docker_ok}" != "true" ]; then
|
if [ "${docker_ok}" != "true" ] && [ "${retry_docker_start_count}" != "4" ]; then
|
||||||
echo "(*) Failed to start docker, retrying..."
|
echo "(*) Failed to start docker, retrying..."
|
||||||
|
set +e
|
||||||
|
sudo_if pkill dockerd
|
||||||
|
sudo_if pkill containerd
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
retry_docker_start_count=`expr $retry_docker_start_count + 1`
|
retry_docker_start_count=`expr $retry_docker_start_count + 1`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "docker-outside-of-docker",
|
"id": "docker-outside-of-docker",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"name": "Docker (docker-outside-of-docker)",
|
"name": "Docker (docker-outside-of-docker)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker",
|
||||||
"description": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",
|
"description": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",
|
||||||
|
|
|
@ -18,8 +18,8 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
||||||
INSTALL_DOCKER_BUILDX="${INSTALLDOCKERBUILDX:-"true"}"
|
INSTALL_DOCKER_BUILDX="${INSTALLDOCKERBUILDX:-"true"}"
|
||||||
|
|
||||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||||
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"
|
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal jammy"
|
||||||
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
|
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal hirsute impish jammy"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -48,21 +48,6 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
||||||
USERNAME=root
|
USERNAME=root
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
@ -129,8 +114,6 @@ architecture="$(dpkg --print-architecture)"
|
||||||
|
|
||||||
# Check if distro is supported
|
# Check if distro is supported
|
||||||
if [ "${USE_MOBY}" = "true" ]; then
|
if [ "${USE_MOBY}" = "true" ]; then
|
||||||
# 'get_common_setting' allows attribute to be updated remotely
|
|
||||||
get_common_setting DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES
|
|
||||||
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
if [[ "${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, either: (1) set feature option '\"moby\": false' , or (2) choose a compatible OS distribution"
|
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, either: (1) set feature option '\"moby\": false' , or (2) choose a compatible OS distribution"
|
||||||
err "Support distributions include: ${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}"
|
err "Support distributions include: ${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}"
|
||||||
|
@ -138,7 +121,6 @@ if [ "${USE_MOBY}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
||||||
else
|
else
|
||||||
get_common_setting DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES
|
|
||||||
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
||||||
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
||||||
|
@ -153,7 +135,6 @@ if [ "${USE_MOBY}" = "true" ]; then
|
||||||
cli_package_name="moby-cli"
|
cli_package_name="moby-cli"
|
||||||
|
|
||||||
# Import key safely and import Microsoft apt repo
|
# Import key safely and import Microsoft apt repo
|
||||||
get_common_setting MICROSOFT_GPG_KEYS_URI
|
|
||||||
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
|
||||||
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
|
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "dotnet",
|
"id": "dotnet",
|
||||||
"version": "2.0.0",
|
"version": "2.0.2",
|
||||||
"name": "Dotnet CLI",
|
"name": "Dotnet CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
|
||||||
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
|
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",
|
||||||
|
|
97
src/dotnet/scripts/vendor/dotnet-install.sh
vendored
97
src/dotnet/scripts/vendor/dotnet-install.sh
vendored
|
@ -314,6 +314,10 @@ get_machine_architecture() {
|
||||||
echo "ppc64le"
|
echo "ppc64le"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
loongarch64)
|
||||||
|
echo "loongarch64"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -355,6 +359,10 @@ get_normalized_architecture_from_architecture() {
|
||||||
echo "ppc64le"
|
echo "ppc64le"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
loongarch64)
|
||||||
|
echo "loongarch64"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues"
|
say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues"
|
||||||
|
@ -415,8 +423,13 @@ get_normalized_os() {
|
||||||
echo "$osname"
|
echo "$osname"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
macos)
|
||||||
|
osname='osx'
|
||||||
|
echo "$osname"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues."
|
say_err "'$user_defined_os' is not a supported value for --os option, supported values are: osx, macos, linux, linux-musl, freebsd, rhel.6. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues."
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -546,6 +559,40 @@ is_dotnet_package_installed() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# args:
|
||||||
|
# downloaded file - $1
|
||||||
|
# remote_file_size - $2
|
||||||
|
validate_remote_local_file_sizes()
|
||||||
|
{
|
||||||
|
eval $invocation
|
||||||
|
|
||||||
|
local downloaded_file="$1"
|
||||||
|
local remote_file_size="$2"
|
||||||
|
local file_size=''
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
|
file_size="$(stat -c '%s' "$downloaded_file")"
|
||||||
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# hardcode in order to avoid conflicts with GNU stat
|
||||||
|
file_size="$(/usr/bin/stat -f '%z' "$downloaded_file")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$file_size" ]; then
|
||||||
|
say "Downloaded file size is $file_size bytes."
|
||||||
|
|
||||||
|
if [ -n "$remote_file_size" ] && [ -n "$file_size" ]; then
|
||||||
|
if [ "$remote_file_size" -ne "$file_size" ]; then
|
||||||
|
say "The remote and local file sizes are not equal. The remote file size is $remote_file_size bytes and the local size is $file_size bytes. The local package may be corrupted."
|
||||||
|
else
|
||||||
|
say "The remote and local file sizes are equal."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
say "Either downloaded or local package size can not be measured. One of them may be corrupted."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# args:
|
# args:
|
||||||
# azure_feed - $1
|
# azure_feed - $1
|
||||||
# channel - $2
|
# channel - $2
|
||||||
|
@ -914,14 +961,39 @@ copy_files_or_dirs_from_list() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# args:
|
||||||
|
# zip_uri - $1
|
||||||
|
get_remote_file_size() {
|
||||||
|
local zip_uri="$1"
|
||||||
|
|
||||||
|
if machine_has "curl"; then
|
||||||
|
file_size=$(curl -sI "$zip_uri" | grep -i content-length | awk '{ num = $2 + 0; print num }')
|
||||||
|
elif machine_has "wget"; then
|
||||||
|
file_size=$(wget --spider --server-response -O /dev/null "$zip_uri" 2>&1 | grep -i 'Content-Length:' | awk '{ num = $2 + 0; print num }')
|
||||||
|
else
|
||||||
|
say "Neither curl nor wget is available on this system."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$file_size" ]; then
|
||||||
|
say "Remote file $zip_uri size is $file_size bytes."
|
||||||
|
echo "$file_size"
|
||||||
|
else
|
||||||
|
say_verbose "Content-Length header was not extracted for $zip_uri."
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# args:
|
# args:
|
||||||
# zip_path - $1
|
# zip_path - $1
|
||||||
# out_path - $2
|
# out_path - $2
|
||||||
|
# remote_file_size - $3
|
||||||
extract_dotnet_package() {
|
extract_dotnet_package() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
local zip_path="$1"
|
local zip_path="$1"
|
||||||
local out_path="$2"
|
local out_path="$2"
|
||||||
|
local remote_file_size="$3"
|
||||||
|
|
||||||
local temp_out_path="$(mktemp -d "$temporary_file_template")"
|
local temp_out_path="$(mktemp -d "$temporary_file_template")"
|
||||||
|
|
||||||
|
@ -932,8 +1004,12 @@ extract_dotnet_package() {
|
||||||
find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
|
find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false
|
||||||
find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
|
find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files"
|
||||||
|
|
||||||
|
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"
|
||||||
|
|
||||||
rm -rf "$temp_out_path"
|
rm -rf "$temp_out_path"
|
||||||
|
if [ -z ${keep_zip+x} ]; then
|
||||||
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
|
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$failed" = true ]; then
|
if [ "$failed" = true ]; then
|
||||||
say_err "Extraction failed"
|
say_err "Extraction failed"
|
||||||
|
@ -1427,9 +1503,10 @@ install_dotnet() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
local download_failed=false
|
local download_failed=false
|
||||||
local download_completed=false
|
local download_completed=false
|
||||||
|
local remote_file_size=0
|
||||||
|
|
||||||
mkdir -p "$install_root"
|
mkdir -p "$install_root"
|
||||||
zip_path="$(mktemp "$temporary_file_template")"
|
zip_path="${zip_path:-$(mktemp "$temporary_file_template")}"
|
||||||
say_verbose "Zip path: $zip_path"
|
say_verbose "Zip path: $zip_path"
|
||||||
|
|
||||||
for link_index in "${!download_links[@]}"
|
for link_index in "${!download_links[@]}"
|
||||||
|
@ -1467,8 +1544,10 @@ install_dotnet() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
remote_file_size="$(get_remote_file_size "$download_link")"
|
||||||
|
|
||||||
say "Extracting zip from $download_link"
|
say "Extracting zip from $download_link"
|
||||||
extract_dotnet_package "$zip_path" "$install_root" || return 1
|
extract_dotnet_package "$zip_path" "$install_root" "$remote_file_size" || return 1
|
||||||
|
|
||||||
# Check if the SDK version is installed; if not, fail the installation.
|
# Check if the SDK version is installed; if not, fail the installation.
|
||||||
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
|
# if the version contains "RTM" or "servicing"; check if a 'release-type' SDK version is installed.
|
||||||
|
@ -1618,6 +1697,14 @@ do
|
||||||
override_non_versioned_files=false
|
override_non_versioned_files=false
|
||||||
non_dynamic_parameters+=" $name"
|
non_dynamic_parameters+=" $name"
|
||||||
;;
|
;;
|
||||||
|
--keep-zip|-[Kk]eep[Zz]ip)
|
||||||
|
keep_zip=true
|
||||||
|
non_dynamic_parameters+=" $name"
|
||||||
|
;;
|
||||||
|
--zip-path|-[Zz]ip[Pp]ath)
|
||||||
|
shift
|
||||||
|
zip_path="$1"
|
||||||
|
;;
|
||||||
-?|--?|-h|--help|-[Hh]elp)
|
-?|--?|-h|--help|-[Hh]elp)
|
||||||
script_name="$(basename "$0")"
|
script_name="$(basename "$0")"
|
||||||
echo ".NET Tools Installer"
|
echo ".NET Tools Installer"
|
||||||
|
@ -1663,7 +1750,7 @@ do
|
||||||
echo " -InstallDir"
|
echo " -InstallDir"
|
||||||
echo " --architecture <ARCHITECTURE> Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`."
|
echo " --architecture <ARCHITECTURE> Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`."
|
||||||
echo " --arch,-Architecture,-Arch"
|
echo " --arch,-Architecture,-Arch"
|
||||||
echo " Possible values: x64, arm, arm64, s390x and ppc64le"
|
echo " Possible values: x64, arm, arm64, s390x, ppc64le and loongarch64"
|
||||||
echo " --os <system> Specifies operating system to be used when selecting the installer."
|
echo " --os <system> Specifies operating system to be used when selecting the installer."
|
||||||
echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
|
echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
|
||||||
echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
|
echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
|
||||||
|
@ -1688,6 +1775,8 @@ do
|
||||||
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
|
echo " --no-cdn,-NoCdn Disable downloading from the Azure CDN, and use the uncached feed directly."
|
||||||
echo " --jsonfile <JSONFILE> Determines the SDK version from a user specified global.json file."
|
echo " --jsonfile <JSONFILE> Determines the SDK version from a user specified global.json file."
|
||||||
echo " Note: global.json must have a value for 'SDK:Version'"
|
echo " Note: global.json must have a value for 'SDK:Version'"
|
||||||
|
echo " --keep-zip,-KeepZip If set, downloaded file is kept."
|
||||||
|
echo " --zip-path, -ZipPath If set, downloaded file is stored at the specified path."
|
||||||
echo " -?,--?,-h,--help,-Help Shows this help message"
|
echo " -?,--?,-h,--help,-Help Shows this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Install Location:"
|
echo "Install Location:"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git-lfs",
|
"id": "git-lfs",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"name": "Git Large File Support (LFS)",
|
"name": "Git Large File Support (LFS)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git-lfs",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git-lfs",
|
||||||
"description": "Installs Git Large File Support (Git LFS) along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like git and curl.",
|
"description": "Installs Git Large File Support (Git LFS) along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like git and curl.",
|
||||||
|
|
|
@ -15,6 +15,7 @@ GIT_LFS_ARCHIVE_ARCHITECTURES="amd64 arm64"
|
||||||
GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
|
GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
|
||||||
GIT_LFS_CHECKSUM_GPG_KEYS="0x88ace9b29196305ba9947552f1ba225c0223b187 0x86cd3297749375bcf8206715f54fe648088335a9 0xaa3b3450295830d2de6db90caba67be5a5795889"
|
GIT_LFS_CHECKSUM_GPG_KEYS="0x88ace9b29196305ba9947552f1ba225c0223b187 0x86cd3297749375bcf8206715f54fe648088335a9 0xaa3b3450295830d2de6db90caba67be5a5795889"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git",
|
"id": "git",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
"name": "Git (from source)",
|
"name": "Git (from source)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
|
||||||
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",
|
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",
|
||||||
|
|
|
@ -12,6 +12,7 @@ USE_PPA_IF_AVAILABLE=${PPA}
|
||||||
|
|
||||||
GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24
|
GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "github-cli",
|
"id": "github-cli",
|
||||||
"version": "1.0.10",
|
"version": "1.0.11",
|
||||||
"name": "GitHub CLI",
|
"name": "GitHub CLI",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/github-cli",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/github-cli",
|
||||||
"description": "Installs the GitHub CLI. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs the GitHub CLI. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -12,6 +12,7 @@ INSTALL_DIRECTLY_FROM_GITHUB_RELEASE=${INSTALLDIRECTLYFROMGITHUBRELEASE:-"true"}
|
||||||
|
|
||||||
GITHUB_CLI_ARCHIVE_GPG_KEY=23F3D4EA75716059
|
GITHUB_CLI_ARCHIVE_GPG_KEY=23F3D4EA75716059
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "go",
|
"id": "go",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"name": "Go",
|
"name": "Go",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/go",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/go",
|
||||||
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs Go and common Go utilities. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -84,21 +84,6 @@ find_version_from_git_tags() {
|
||||||
echo "${variable_name}=${!variable_name}"
|
echo "${variable_name}=${!variable_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
apt_get_update()
|
apt_get_update()
|
||||||
{
|
{
|
||||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||||
|
@ -148,7 +133,6 @@ if [[ "${TARGET_GO_VERSION}" != "none" ]] && [[ "$(go version)" != *"${TARGET_GO
|
||||||
export GNUPGHOME="/tmp/tmp-gnupg"
|
export GNUPGHOME="/tmp/tmp-gnupg"
|
||||||
mkdir -p ${GNUPGHOME}
|
mkdir -p ${GNUPGHOME}
|
||||||
chmod 700 ${GNUPGHOME}
|
chmod 700 ${GNUPGHOME}
|
||||||
get_common_setting GO_GPG_KEY_URI
|
|
||||||
curl -sSL -o /tmp/tmp-gnupg/golang_key "${GO_GPG_KEY_URI}"
|
curl -sSL -o /tmp/tmp-gnupg/golang_key "${GO_GPG_KEY_URI}"
|
||||||
gpg -q --import /tmp/tmp-gnupg/golang_key
|
gpg -q --import /tmp/tmp-gnupg/golang_key
|
||||||
echo "Downloading Go ${TARGET_GO_VERSION}..."
|
echo "Downloading Go ${TARGET_GO_VERSION}..."
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "kubectl-helm-minikube",
|
"id": "kubectl-helm-minikube",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"name": "Kubectl, Helm, and Minikube",
|
"name": "Kubectl, Helm, and Minikube",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube",
|
||||||
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
|
"description": "Installs latest version of kubectl, Helm, and optionally minikube. Auto-detects latest versions and installs needed dependencies.",
|
||||||
|
|
|
@ -23,6 +23,7 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
||||||
|
|
||||||
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
|
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "node",
|
"id": "node",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"name": "Node.js (via nvm), yarn and pnpm",
|
"name": "Node.js (via nvm), yarn and pnpm",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
|
||||||
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
|
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
|
||||||
|
|
|
@ -228,6 +228,9 @@ if type pnpm > /dev/null 2>&1; then
|
||||||
echo "pnpm already installed."
|
echo "pnpm already installed."
|
||||||
else
|
else
|
||||||
if type npm > /dev/null 2>&1; then
|
if type npm > /dev/null 2>&1; then
|
||||||
|
[ ! -z "$http_proxy" ] && npm set proxy="$http_proxy"
|
||||||
|
[ ! -z "$https_proxy" ] && npm set https-proxy="$https_proxy"
|
||||||
|
[ ! -z "$no_proxy" ] && npm set noproxy="$no_proxy"
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
else
|
else
|
||||||
echo "Skip installing pnpm because npm is missing"
|
echo "Skip installing pnpm because npm is missing"
|
||||||
|
|
|
@ -18,6 +18,12 @@ Installs PowerShell along with needed dependencies. Useful for base Dockerfiles
|
||||||
| version | Select or enter a version of PowerShell. | string | latest |
|
| version | Select or enter a version of PowerShell. | string | latest |
|
||||||
| modules | Optional comma separated list of PowerShell modules to install. | string | - |
|
| modules | Optional comma separated list of PowerShell modules to install. | string | - |
|
||||||
|
|
||||||
|
## Customizations
|
||||||
|
|
||||||
|
### VS Code Extensions
|
||||||
|
|
||||||
|
- `ms-vscode.powershell`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "powershell",
|
"id": "powershell",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"name": "PowerShell",
|
"name": "PowerShell",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/powershell",
|
||||||
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
"description": "Installs PowerShell along with needed dependencies. Useful for base Dockerfiles that often are missing required install dependencies like gpg.",
|
||||||
|
@ -21,6 +21,13 @@
|
||||||
"description": "Optional comma separated list of PowerShell modules to install."
|
"description": "Optional comma separated list of PowerShell modules to install."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-vscode.powershell"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"installsAfter": [
|
"installsAfter": [
|
||||||
"ghcr.io/devcontainers/features/common-utils"
|
"ghcr.io/devcontainers/features/common-utils"
|
||||||
]
|
]
|
||||||
|
|
|
@ -19,6 +19,7 @@ MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||||
POWERSHELL_ARCHIVE_ARCHITECTURES="amd64"
|
POWERSHELL_ARCHIVE_ARCHITECTURES="amd64"
|
||||||
POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal bullseye jammy"
|
POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal bullseye jammy"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "python",
|
"id": "python",
|
||||||
"version": "1.2.0",
|
"version": "1.3.1",
|
||||||
"name": "Python",
|
"name": "Python",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
|
||||||
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
|
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
"latest",
|
"latest",
|
||||||
"os-provided",
|
"os-provided",
|
||||||
"none",
|
"none",
|
||||||
|
"3.12",
|
||||||
"3.11",
|
"3.11",
|
||||||
"3.10",
|
"3.10",
|
||||||
"3.9",
|
"3.9",
|
||||||
|
@ -65,15 +66,7 @@
|
||||||
"ms-python.vscode-pylance"
|
"ms-python.vscode-pylance"
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python",
|
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python"
|
||||||
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
|
|
||||||
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
|
|
||||||
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
|
|
||||||
"python.linting.flake8Enabled": false,
|
|
||||||
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
|
|
||||||
"python.linting.mypyEnabled": false,
|
|
||||||
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint",
|
|
||||||
"python.linting.pylintEnabled": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -27,8 +27,9 @@ CONFIGURE_JUPYTERLAB_ALLOW_ORIGIN="${CONFIGUREJUPYTERLABALLOWORIGIN:-""}"
|
||||||
ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
|
ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
|
||||||
|
|
||||||
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv" "pytest")
|
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv" "pytest")
|
||||||
PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5"
|
PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5 A821E680E5FA6305"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.
|
||||||
|
|
||||||
### VS Code Extensions
|
### VS Code Extensions
|
||||||
|
|
||||||
- `rebornix.Ruby`
|
|
||||||
- `shopify.ruby-lsp`
|
- `shopify.ruby-lsp`
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ruby",
|
"id": "ruby",
|
||||||
"version": "1.1.1",
|
"version": "1.2.0",
|
||||||
"name": "Ruby (via rvm)",
|
"name": "Ruby (via rvm)",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby",
|
||||||
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
|
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
|
||||||
|
@ -21,7 +21,6 @@
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"rebornix.Ruby",
|
|
||||||
"shopify.ruby-lsp"
|
"shopify.ruby-lsp"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ DEFAULT_GEMS="rake"
|
||||||
|
|
||||||
RVM_GPG_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
RVM_GPG_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
|
keyserver hkp://keyserver.ubuntu.com:80
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "rust",
|
"id": "rust",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"name": "Rust",
|
"name": "Rust",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
|
||||||
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
||||||
|
|
|
@ -48,21 +48,6 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
||||||
USERNAME=root
|
USERNAME=root
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get central common setting
|
|
||||||
get_common_setting() {
|
|
||||||
if [ "${common_settings_file_loaded}" != "true" ]; then
|
|
||||||
curl -sfL "https://aka.ms/vscode-dev-containers/script-library/settings.env" 2>/dev/null -o /tmp/vsdc-settings.env || echo "Could not download settings file. Skipping."
|
|
||||||
common_settings_file_loaded=true
|
|
||||||
fi
|
|
||||||
if [ -f "/tmp/vsdc-settings.env" ]; then
|
|
||||||
local multi_line=""
|
|
||||||
if [ "$2" = "true" ]; then multi_line="-z"; fi
|
|
||||||
local result="$(grep ${multi_line} -oP "$1=\"?\K[^\"]+" /tmp/vsdc-settings.env | tr -d '\0')"
|
|
||||||
if [ ! -z "${result}" ]; then declare -g $1="${result}"; fi
|
|
||||||
fi
|
|
||||||
echo "$1=${!1}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Figure out correct version of a three part version number is not passed
|
# Figure out correct version of a three part version number is not passed
|
||||||
find_version_from_git_tags() {
|
find_version_from_git_tags() {
|
||||||
local variable_name=$1
|
local variable_name=$1
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
|
||||||
|
|
||||||
|
## Licensing
|
||||||
|
|
||||||
|
On August 10, 2023, HashiCorp announced a change of license for its products, including Terraform. After ~9 years of Terraform being open source under the MPL v2 license, it was to move under a non-open source BSL v1.1 license, starting from the next (1.6) version. See https://github.com/hashicorp/terraform/blob/main/LICENSE
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
|
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
|
||||||
|
|
|
@ -32,6 +32,10 @@ Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects la
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Licensing
|
||||||
|
|
||||||
|
On August 10, 2023, HashiCorp announced a change of license for its products, including Terraform. After ~9 years of Terraform being open source under the MPL v2 license, it was to move under a non-open source BSL v1.1 license, starting from the next (1.6) version. See https://github.com/hashicorp/terraform/blob/main/LICENSE
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
|
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "terraform",
|
"id": "terraform",
|
||||||
"version": "1.3.4",
|
"version": "1.3.5",
|
||||||
"name": "Terraform, tflint, and TFGrunt",
|
"name": "Terraform, tflint, and TFGrunt",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/terraform",
|
||||||
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",
|
"description": "Installs the Terraform CLI and optionally TFLint and Terragrunt. Auto-detects latest version and installs needed dependencies.",
|
||||||
|
|
|
@ -77,6 +77,25 @@ receive_gpg_keys() {
|
||||||
sleep 10s
|
sleep 10s
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# If all attempts fail, try getting the keyserver IP address and explicitly passing it to gpg
|
||||||
|
if [ "${gpg_ok}" = "false" ]; then
|
||||||
|
retry_count=0;
|
||||||
|
echo "(*) Resolving GPG keyserver IP address..."
|
||||||
|
local keyserver_ip_address=$( dig +short keyserver.ubuntu.com | head -n1 )
|
||||||
|
echo "(*) GPG keyserver IP address $keyserver_ip_address"
|
||||||
|
|
||||||
|
until [ "${gpg_ok}" = "true" ] || [ "${retry_count}" -eq "3" ];
|
||||||
|
do
|
||||||
|
echo "(*) Downloading GPG key..."
|
||||||
|
( echo "${keys}" | xargs -n 1 gpg -q ${keyring_args} --recv-keys --keyserver ${keyserver_ip_address}) 2>&1 && gpg_ok="true"
|
||||||
|
if [ "${gpg_ok}" != "true" ]; then
|
||||||
|
echo "(*) Failed getting key, retring in 10s..."
|
||||||
|
(( retry_count++ ))
|
||||||
|
sleep 10s
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
set -e
|
set -e
|
||||||
if [ "${gpg_ok}" = "false" ]; then
|
if [ "${gpg_ok}" = "false" ]; then
|
||||||
echo "(!) Failed to get gpg key."
|
echo "(!) Failed to get gpg key."
|
||||||
|
@ -183,7 +202,7 @@ ensure_cosign() {
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# Install dependencies if missing
|
# Install dependencies if missing
|
||||||
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip
|
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip dnsutils
|
||||||
if ! type git > /dev/null 2>&1; then
|
if ! type git > /dev/null 2>&1; then
|
||||||
check_packages git
|
check_packages git
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -9,6 +9,9 @@ source dev-container-features-test-lib
|
||||||
check "default-shell-is-zsh" bash -c "getent passwd $(whoami) | awk -F: '{ print $7 }' | grep '/bin/zsh'"
|
check "default-shell-is-zsh" bash -c "getent passwd $(whoami) | awk -F: '{ print $7 }' | grep '/bin/zsh'"
|
||||||
# check it overrides the ~/.zshrc with default dev containers template
|
# check it overrides the ~/.zshrc with default dev containers template
|
||||||
check "default-zshrc-is-dev-container-template" bash -c "cat ~/.zshrc | grep ZSH_THEME | grep devcontainers"
|
check "default-zshrc-is-dev-container-template" bash -c "cat ~/.zshrc | grep ZSH_THEME | grep devcontainers"
|
||||||
|
check "zsh-path-contains-local-bin" zsh -l -c "echo $PATH | grep '/home/devcontainer/.local/bin'"
|
||||||
|
|
||||||
|
check "Ensure .zprofile is owned by remoteUser" bash -c "stat -c '%U' /home/devcontainer/.zprofile | grep devcontainer"
|
||||||
|
|
||||||
# Report result
|
# Report result
|
||||||
reportResults
|
reportResults
|
||||||
|
|
|
@ -108,12 +108,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"configure_zsh_as_default_shell": {
|
"configure_zsh_as_default_shell": {
|
||||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
"image": "ubuntu",
|
||||||
"features": {
|
"features": {
|
||||||
"common-utils": {
|
"common-utils": {
|
||||||
|
"installZsh": true,
|
||||||
"configureZshAsDefaultShell": true
|
"configureZshAsDefaultShell": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"remoteUser": "devcontainer"
|
||||||
},
|
},
|
||||||
"configure_zsh_no_template_second_step": {
|
"configure_zsh_no_template_second_step": {
|
||||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
||||||
|
|
38
test/python/install_python_3_12.sh
Executable file
38
test/python/install_python_3_12.sh
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Optional: Import test library
|
||||||
|
source dev-container-features-test-lib
|
||||||
|
|
||||||
|
check "python version 3.12 installed as default" bash -c "python --version | grep 3.12"
|
||||||
|
check "python3 version 3.12 installed as default" bash -c "python3 --version | grep 3.12"
|
||||||
|
|
||||||
|
# Check that tools can execute - make sure something didn't get messed up in this scenario
|
||||||
|
check "autopep8" autopep8 --version
|
||||||
|
check "black" black --version
|
||||||
|
check "yapf" yapf --version
|
||||||
|
check "bandit" bandit --version
|
||||||
|
check "flake8" flake8 --version
|
||||||
|
check "mypy" mypy --version
|
||||||
|
check "pycodestyle" pycodestyle --version
|
||||||
|
check "pydocstyle" pydocstyle --version
|
||||||
|
check "pylint" pylint --version
|
||||||
|
check "pytest" pytest --version
|
||||||
|
|
||||||
|
# Check paths in settings
|
||||||
|
check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python"
|
||||||
|
check "current symlink works" /usr/local/python/current/bin/python --version
|
||||||
|
check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8"
|
||||||
|
check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black"
|
||||||
|
check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf"
|
||||||
|
check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit"
|
||||||
|
check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8"
|
||||||
|
check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy"
|
||||||
|
check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle"
|
||||||
|
check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle"
|
||||||
|
check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint"
|
||||||
|
check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest"
|
||||||
|
|
||||||
|
# Report result
|
||||||
|
reportResults
|
|
@ -32,7 +32,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"install_os_provided_python": {
|
"install_os_provided_python": {
|
||||||
"image": "mcr.microsoft.com/devcontainers/base:0-bullseye",
|
"image": "mcr.microsoft.com/devcontainers/base:1-bullseye",
|
||||||
"features": {
|
"features": {
|
||||||
"python": "os-provided"
|
"python": "os-provided"
|
||||||
}
|
}
|
||||||
|
@ -73,5 +73,13 @@
|
||||||
"configureJupyterlabAllowOrigin": "*"
|
"configureJupyterlabAllowOrigin": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"install_python_3_12": {
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/base:1-ubuntu-22.04",
|
||||||
|
"features": {
|
||||||
|
"python": {
|
||||||
|
"version": "3.12"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue