Compare commits
1 commit
main
...
automated-
Author | SHA1 | Date | |
---|---|---|---|
|
853d280916 |
42 changed files with 166 additions and 260 deletions
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||
},
|
||||
"postCreateCommand": "npm install -g @devcontainers/cli",
|
||||
"hostRequirements": {
|
||||
"cpus": 4
|
||||
},
|
||||
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
|
||||
"remoteUser": "node",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"mads-hartmann.bash-ide-vscode"
|
||||
]
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||
},
|
||||
"postCreateCommand": "npm install -g @devcontainers/cli",
|
||||
"hostRequirements": {
|
||||
"cpus": 4
|
||||
}
|
||||
}
|
|
@ -35,11 +35,8 @@ jobs:
|
|||
git add src/dotnet/scripts/vendor/dotnet-install.sh
|
||||
git commit -m 'Automated dotnet-install script update' || export NO_UPDATES=true
|
||||
|
||||
# Bump version and push
|
||||
# Push
|
||||
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"
|
||||
gh api \
|
||||
--method POST \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "aws-cli",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.6",
|
||||
"name": "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.",
|
||||
|
|
|
@ -50,6 +50,21 @@ if [ "$(id -u)" -ne 0 ]; then
|
|||
exit 1
|
||||
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()
|
||||
{
|
||||
echo "Running apt-get update..."
|
||||
|
@ -74,6 +89,9 @@ check_packages curl ca-certificates gnupg2 dirmngr unzip
|
|||
verify_aws_cli_gpg_signature() {
|
||||
local filePath=$1
|
||||
local sigFilePath=$2
|
||||
|
||||
get_common_setting AWSCLI_GPG_KEY
|
||||
get_common_setting AWSCLI_GPG_KEY_MATERIAL true
|
||||
local awsGpgKeyring=aws-cli-public-key.gpg
|
||||
|
||||
echo "${AWSCLI_GPG_KEY_MATERIAL}" | gpg --dearmor > "./${awsGpgKeyring}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "azure-cli",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.1",
|
||||
"name": "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.",
|
||||
|
|
|
@ -32,6 +32,21 @@ fi
|
|||
|
||||
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()
|
||||
{
|
||||
echo "Running apt-get update..."
|
||||
|
@ -95,6 +110,7 @@ install_using_apt() {
|
|||
# Install dependencies
|
||||
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
|
||||
get_common_setting MICROSOFT_GPG_KEYS_URI
|
||||
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
|
||||
apt-get update
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "common-utils",
|
||||
"version": "2.3.1",
|
||||
"version": "2.2.0",
|
||||
"name": "Common Utilities",
|
||||
"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.",
|
||||
|
|
|
@ -189,11 +189,11 @@ install_redhat_packages() {
|
|||
man-db \
|
||||
strace"
|
||||
|
||||
# rockylinux:9 installs 'curl-minimal' which clashes with 'curl'
|
||||
# Install 'curl' for every OS except this rockylinux:9
|
||||
if [[ "${ID}" = "rocky" ]] && [[ "${VERSION}" != *"9."* ]]; then
|
||||
package_list="${package_list} curl"
|
||||
fi
|
||||
# rockylinux:9 installs 'curl-minimal' which clashes with 'curl'
|
||||
# Install 'curl' for every OS except this rockylinux:9
|
||||
if [[ "${ID}" = "rocky" ]] && [[ "${VERSION}" != *"9."* ]]; then
|
||||
package_list="${package_list} curl"
|
||||
fi
|
||||
|
||||
# Install OpenSSL 1.0 compat if needed
|
||||
if ${install_cmd} -q list compat-openssl10 >/dev/null 2>&1; then
|
||||
|
@ -222,9 +222,7 @@ install_redhat_packages() {
|
|||
package_list="${package_list} zsh"
|
||||
fi
|
||||
|
||||
if [ -n "${package_list}" ]; then
|
||||
${install_cmd} -y install ${package_list}
|
||||
fi
|
||||
${install_cmd} -y install ${package_list}
|
||||
|
||||
# Get to latest versions of all packages
|
||||
if [ "${UPGRADE_PACKAGES}" = "true" ]; then
|
||||
|
@ -423,7 +421,6 @@ fi
|
|||
# Restore user .bashrc / .profile / .zshrc defaults from skeleton file if it doesn't exist or is empty
|
||||
possible_rc_files=( ".bashrc" ".profile" )
|
||||
[ "$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
|
||||
if [ -f "/etc/skel/${rc_file}" ]; then
|
||||
if [ ! -e "${user_home}/${rc_file}" ] || [ ! -s "${user_home}/${rc_file}" ]; then
|
||||
|
@ -459,19 +456,13 @@ fi
|
|||
|
||||
# Optionally configure zsh and Oh My Zsh!
|
||||
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 [ "${ADJUSTED_ID}" = "rhel" ]; then
|
||||
global_rc_path="/etc/zshrc"
|
||||
else
|
||||
global_rc_path="/etc/zsh/zshrc"
|
||||
fi
|
||||
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
|
||||
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> /etc/zshrc
|
||||
ZSH_ALREADY_INSTALLED="true"
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "docker-in-docker",
|
||||
"version": "2.7.1",
|
||||
"version": "2.5.0",
|
||||
"name": "Docker (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.",
|
||||
|
|
|
@ -57,6 +57,21 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
|||
USERNAME=root
|
||||
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()
|
||||
{
|
||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||
|
@ -122,6 +137,8 @@ architecture="$(dpkg --print-architecture)"
|
|||
|
||||
# Check if distro is supported
|
||||
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
|
||||
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}"
|
||||
|
@ -129,6 +146,7 @@ if [ "${USE_MOBY}" = "true" ]; then
|
|||
fi
|
||||
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
||||
else
|
||||
get_common_setting DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES
|
||||
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
||||
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
||||
|
@ -159,6 +177,7 @@ if [ "${USE_MOBY}" = "true" ]; then
|
|||
cli_package_name="moby-cli"
|
||||
|
||||
# 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
|
||||
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
|
||||
|
@ -344,6 +363,7 @@ tee -a /usr/local/share/docker-init.sh > /dev/null \
|
|||
<< 'EOF'
|
||||
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
|
||||
# ie: docker kill <ID>
|
||||
find /run /var/run -iname 'docker*.pid' -delete || :
|
||||
find /run /var/run -iname 'container*.pid' -delete || :
|
||||
|
||||
|
@ -424,16 +444,6 @@ dockerd_start="AZURE_DNS_AUTO_DETECTION=${AZURE_DNS_AUTO_DETECTION} DOCKER_DEFAU
|
|||
INNEREOF
|
||||
)"
|
||||
|
||||
sudo_if() {
|
||||
COMMAND="$*"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
sudo $COMMAND
|
||||
else
|
||||
$COMMAND
|
||||
fi
|
||||
}
|
||||
|
||||
retry_docker_start_count=0
|
||||
docker_ok="false"
|
||||
|
||||
|
@ -457,12 +467,8 @@ do
|
|||
retry_count=`expr $retry_count + 1`
|
||||
done
|
||||
|
||||
if [ "${docker_ok}" != "true" ] && [ "${retry_docker_start_count}" != "4" ]; then
|
||||
if [ "${docker_ok}" != "true" ]; then
|
||||
echo "(*) Failed to start docker, retrying..."
|
||||
set +e
|
||||
sudo_if pkill dockerd
|
||||
sudo_if pkill containerd
|
||||
set -e
|
||||
fi
|
||||
|
||||
retry_docker_start_count=`expr $retry_docker_start_count + 1`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "docker-outside-of-docker",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.0",
|
||||
"name": "Docker (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.",
|
||||
|
|
|
@ -18,8 +18,8 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
|||
INSTALL_DOCKER_BUILDX="${INSTALLDOCKERBUILDX:-"true"}"
|
||||
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal jammy"
|
||||
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal hirsute impish jammy"
|
||||
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"
|
||||
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -48,6 +48,21 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
|||
USERNAME=root
|
||||
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()
|
||||
{
|
||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||
|
@ -114,6 +129,8 @@ architecture="$(dpkg --print-architecture)"
|
|||
|
||||
# Check if distro is supported
|
||||
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
|
||||
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}"
|
||||
|
@ -121,6 +138,7 @@ if [ "${USE_MOBY}" = "true" ]; then
|
|||
fi
|
||||
echo "Distro codename '${VERSION_CODENAME}' matched filter '${DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES}'"
|
||||
else
|
||||
get_common_setting DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES
|
||||
if [[ "${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}" != *"${VERSION_CODENAME}"* ]]; then
|
||||
err "Unsupported distribution version '${VERSION_CODENAME}'. To resolve, please choose a compatible OS distribution"
|
||||
err "Support distributions include: ${DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES}"
|
||||
|
@ -135,6 +153,7 @@ if [ "${USE_MOBY}" = "true" ]; then
|
|||
cli_package_name="moby-cli"
|
||||
|
||||
# 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
|
||||
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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "dotnet",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.0",
|
||||
"name": "Dotnet CLI",
|
||||
"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.",
|
||||
|
|
101
src/dotnet/scripts/vendor/dotnet-install.sh
vendored
101
src/dotnet/scripts/vendor/dotnet-install.sh
vendored
|
@ -314,10 +314,6 @@ get_machine_architecture() {
|
|||
echo "ppc64le"
|
||||
return 0
|
||||
;;
|
||||
loongarch64)
|
||||
echo "loongarch64"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
@ -359,10 +355,6 @@ get_normalized_architecture_from_architecture() {
|
|||
echo "ppc64le"
|
||||
return 0
|
||||
;;
|
||||
loongarch64)
|
||||
echo "loongarch64"
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
say_err "Architecture \`$architecture\` not supported. If you think this is a bug, report it at https://github.com/dotnet/install-scripts/issues"
|
||||
|
@ -423,13 +415,8 @@ get_normalized_os() {
|
|||
echo "$osname"
|
||||
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, macos, 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, 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
|
||||
;;
|
||||
esac
|
||||
|
@ -559,40 +546,6 @@ is_dotnet_package_installed() {
|
|||
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:
|
||||
# azure_feed - $1
|
||||
# channel - $2
|
||||
|
@ -961,39 +914,14 @@ copy_files_or_dirs_from_list() {
|
|||
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:
|
||||
# zip_path - $1
|
||||
# out_path - $2
|
||||
# remote_file_size - $3
|
||||
extract_dotnet_package() {
|
||||
eval $invocation
|
||||
|
||||
local zip_path="$1"
|
||||
local out_path="$2"
|
||||
local remote_file_size="$3"
|
||||
|
||||
local temp_out_path="$(mktemp -d "$temporary_file_template")"
|
||||
|
||||
|
@ -1003,13 +931,9 @@ extract_dotnet_package() {
|
|||
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
|
||||
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"
|
||||
|
||||
validate_remote_local_file_sizes "$zip_path" "$remote_file_size"
|
||||
|
||||
|
||||
rm -rf "$temp_out_path"
|
||||
if [ -z ${keep_zip+x} ]; then
|
||||
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
|
||||
fi
|
||||
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
|
||||
|
||||
if [ "$failed" = true ]; then
|
||||
say_err "Extraction failed"
|
||||
|
@ -1503,10 +1427,9 @@ install_dotnet() {
|
|||
eval $invocation
|
||||
local download_failed=false
|
||||
local download_completed=false
|
||||
local remote_file_size=0
|
||||
|
||||
mkdir -p "$install_root"
|
||||
zip_path="${zip_path:-$(mktemp "$temporary_file_template")}"
|
||||
zip_path="$(mktemp "$temporary_file_template")"
|
||||
say_verbose "Zip path: $zip_path"
|
||||
|
||||
for link_index in "${!download_links[@]}"
|
||||
|
@ -1544,10 +1467,8 @@ install_dotnet() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
remote_file_size="$(get_remote_file_size "$download_link")"
|
||||
|
||||
say "Extracting zip from $download_link"
|
||||
extract_dotnet_package "$zip_path" "$install_root" "$remote_file_size" || return 1
|
||||
extract_dotnet_package "$zip_path" "$install_root" || return 1
|
||||
|
||||
# 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.
|
||||
|
@ -1697,14 +1618,6 @@ do
|
|||
override_non_versioned_files=false
|
||||
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)
|
||||
script_name="$(basename "$0")"
|
||||
echo ".NET Tools Installer"
|
||||
|
@ -1750,7 +1663,7 @@ do
|
|||
echo " -InstallDir"
|
||||
echo " --architecture <ARCHITECTURE> Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`."
|
||||
echo " --arch,-Architecture,-Arch"
|
||||
echo " Possible values: x64, arm, arm64, s390x, ppc64le and loongarch64"
|
||||
echo " Possible values: x64, arm, arm64, s390x and ppc64le"
|
||||
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 " In case any other value is provided, the platform will be determined by the script based on machine configuration."
|
||||
|
@ -1775,8 +1688,6 @@ do
|
|||
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 " 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 ""
|
||||
echo "Install Location:"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "git-lfs",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"name": "Git Large File Support (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.",
|
||||
|
|
|
@ -15,7 +15,6 @@ GIT_LFS_ARCHIVE_ARCHITECTURES="amd64 arm64"
|
|||
GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal jammy"
|
||||
GIT_LFS_CHECKSUM_GPG_KEYS="0x88ace9b29196305ba9947552f1ba225c0223b187 0x86cd3297749375bcf8206715f54fe648088335a9 0xaa3b3450295830d2de6db90caba67be5a5795889"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "git",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.5",
|
||||
"name": "Git (from source)",
|
||||
"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.",
|
||||
|
|
|
@ -12,7 +12,6 @@ USE_PPA_IF_AVAILABLE=${PPA}
|
|||
|
||||
GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "github-cli",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.10",
|
||||
"name": "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.",
|
||||
|
|
|
@ -12,7 +12,6 @@ INSTALL_DIRECTLY_FROM_GITHUB_RELEASE=${INSTALLDIRECTLYFROMGITHUBRELEASE:-"true"}
|
|||
|
||||
GITHUB_CLI_ARCHIVE_GPG_KEY=23F3D4EA75716059
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "go",
|
||||
"version": "1.2.2",
|
||||
"version": "1.2.1",
|
||||
"name": "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.",
|
||||
|
|
|
@ -84,6 +84,21 @@ find_version_from_git_tags() {
|
|||
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()
|
||||
{
|
||||
if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
|
||||
|
@ -133,6 +148,7 @@ if [[ "${TARGET_GO_VERSION}" != "none" ]] && [[ "$(go version)" != *"${TARGET_GO
|
|||
export GNUPGHOME="/tmp/tmp-gnupg"
|
||||
mkdir -p ${GNUPGHOME}
|
||||
chmod 700 ${GNUPGHOME}
|
||||
get_common_setting GO_GPG_KEY_URI
|
||||
curl -sSL -o /tmp/tmp-gnupg/golang_key "${GO_GPG_KEY_URI}"
|
||||
gpg -q --import /tmp/tmp-gnupg/golang_key
|
||||
echo "Downloading Go ${TARGET_GO_VERSION}..."
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "kubectl-helm-minikube",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.4",
|
||||
"name": "Kubectl, Helm, and 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.",
|
||||
|
|
|
@ -23,7 +23,6 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
|||
|
||||
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "node",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.0",
|
||||
"name": "Node.js (via nvm), yarn and pnpm",
|
||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
|
||||
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
|
||||
|
|
|
@ -228,9 +228,6 @@ if type pnpm > /dev/null 2>&1; then
|
|||
echo "pnpm already installed."
|
||||
else
|
||||
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
|
||||
else
|
||||
echo "Skip installing pnpm because npm is missing"
|
||||
|
|
|
@ -18,12 +18,6 @@ Installs PowerShell along with needed dependencies. Useful for base Dockerfiles
|
|||
| version | Select or enter a version of PowerShell. | string | latest |
|
||||
| modules | Optional comma separated list of PowerShell modules to install. | string | - |
|
||||
|
||||
## Customizations
|
||||
|
||||
### VS Code Extensions
|
||||
|
||||
- `ms-vscode.powershell`
|
||||
|
||||
|
||||
|
||||
## OS Support
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "powershell",
|
||||
"version": "1.2.0",
|
||||
"version": "1.1.0",
|
||||
"name": "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.",
|
||||
|
@ -19,16 +19,9 @@
|
|||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Optional comma separated list of PowerShell modules to install."
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.powershell"
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
"installsAfter": [
|
||||
"ghcr.io/devcontainers/features/common-utils"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
|||
POWERSHELL_ARCHIVE_ARCHITECTURES="amd64"
|
||||
POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal bullseye jammy"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "python",
|
||||
"version": "1.3.1",
|
||||
"version": "1.2.0",
|
||||
"name": "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.",
|
||||
|
@ -11,7 +11,6 @@
|
|||
"latest",
|
||||
"os-provided",
|
||||
"none",
|
||||
"3.12",
|
||||
"3.11",
|
||||
"3.10",
|
||||
"3.9",
|
||||
|
@ -66,7 +65,15 @@
|
|||
"ms-python.vscode-pylance"
|
||||
],
|
||||
"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,9 +27,8 @@ CONFIGURE_JUPYTERLAB_ALLOW_ORIGIN="${CONFIGUREJUPYTERLABALLOWORIGIN:-""}"
|
|||
ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
|
||||
|
||||
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 A821E680E5FA6305"
|
||||
PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.
|
|||
|
||||
### VS Code Extensions
|
||||
|
||||
- `rebornix.Ruby`
|
||||
- `shopify.ruby-lsp`
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "ruby",
|
||||
"version": "1.2.0",
|
||||
"version": "1.1.1",
|
||||
"name": "Ruby (via rvm)",
|
||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/ruby",
|
||||
"description": "Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.",
|
||||
|
@ -21,6 +21,7 @@
|
|||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"rebornix.Ruby",
|
||||
"shopify.ruby-lsp"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ DEFAULT_GEMS="rake"
|
|||
|
||||
RVM_GPG_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||
keyserver hkp://keyserver.ubuntu.com:80
|
||||
keyserver hkps://keys.openpgp.org
|
||||
keyserver hkp://keyserver.pgp.com"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "rust",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"name": "Rust",
|
||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
|
||||
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
||||
|
|
|
@ -48,6 +48,21 @@ elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
|
|||
USERNAME=root
|
||||
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
|
||||
find_version_from_git_tags() {
|
||||
local variable_name=$1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"id": "terraform",
|
||||
"version": "1.3.5",
|
||||
"version": "1.3.4",
|
||||
"name": "Terraform, tflint, and TFGrunt",
|
||||
"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.",
|
||||
|
|
|
@ -77,25 +77,6 @@ receive_gpg_keys() {
|
|||
sleep 10s
|
||||
fi
|
||||
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
|
||||
if [ "${gpg_ok}" = "false" ]; then
|
||||
echo "(!) Failed to get gpg key."
|
||||
|
@ -202,7 +183,7 @@ ensure_cosign() {
|
|||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install dependencies if missing
|
||||
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip dnsutils
|
||||
check_packages curl ca-certificates gnupg2 dirmngr coreutils unzip
|
||||
if ! type git > /dev/null 2>&1; then
|
||||
check_packages git
|
||||
fi
|
||||
|
|
|
@ -9,9 +9,6 @@ source dev-container-features-test-lib
|
|||
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 "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
|
||||
reportResults
|
||||
|
|
|
@ -108,14 +108,12 @@
|
|||
}
|
||||
},
|
||||
"configure_zsh_as_default_shell": {
|
||||
"image": "ubuntu",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
||||
"features": {
|
||||
"common-utils": {
|
||||
"installZsh": true,
|
||||
"configureZshAsDefaultShell": true
|
||||
}
|
||||
},
|
||||
"remoteUser": "devcontainer"
|
||||
}
|
||||
},
|
||||
"configure_zsh_no_template_second_step": {
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
#!/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": {
|
||||
"image": "mcr.microsoft.com/devcontainers/base:1-bullseye",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:0-bullseye",
|
||||
"features": {
|
||||
"python": "os-provided"
|
||||
}
|
||||
|
@ -73,13 +73,5 @@
|
|||
"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