Update GPG_KEY_SERVERS: Remove :80
from Ubuntu Keyserver (#354)
* Update GPG_KEY_SERVERS: Remove `:80` from Ubuntu Keyserver * Fix ruby tests
This commit is contained in:
parent
48678001d1
commit
b9bfe406d2
18 changed files with 38 additions and 167 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git-lfs",
|
"id": "git-lfs",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"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.",
|
||||||
|
|
|
@ -13,7 +13,7 @@ GIT_LFS_ARCHIVE_GPG_KEY_URI="https://packagecloud.io/github/git-lfs/gpgkey"
|
||||||
GIT_LFS_ARCHIVE_ARCHITECTURES="amd64 arm64"
|
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:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -27,21 +27,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}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -78,9 +63,7 @@ find_version_from_git_tags() {
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
# Import the specified key in a variable name passed in as
|
||||||
receive_gpg_keys() {
|
receive_gpg_keys() {
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
local keys=${!1}
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
|
|
||||||
# Use a temporary locaiton for gpg keys to avoid polluting image
|
# Use a temporary locaiton for gpg keys to avoid polluting image
|
||||||
export GNUPGHOME="/tmp/tmp-gnupg"
|
export GNUPGHOME="/tmp/tmp-gnupg"
|
||||||
|
@ -133,7 +116,6 @@ install_using_apt() {
|
||||||
version_suffix=""
|
version_suffix=""
|
||||||
fi
|
fi
|
||||||
# Install
|
# Install
|
||||||
get_common_setting GIT_LFS_ARCHIVE_GPG_KEY_URI
|
|
||||||
curl -sSL "${GIT_LFS_ARCHIVE_GPG_KEY_URI}" | gpg --dearmor > /usr/share/keyrings/gitlfs-archive-keyring.gpg
|
curl -sSL "${GIT_LFS_ARCHIVE_GPG_KEY_URI}" | gpg --dearmor > /usr/share/keyrings/gitlfs-archive-keyring.gpg
|
||||||
echo -e "deb [arch=${architecture} signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main\ndeb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/git-lfs.list
|
echo -e "deb [arch=${architecture} signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main\ndeb-src [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/gitlfs-archive-keyring.gpg] https://packagecloud.io/github/git-lfs/${ID} ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/git-lfs.list
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "git",
|
"id": "git",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"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.",
|
||||||
|
|
|
@ -11,7 +11,7 @@ GIT_VERSION=${VERSION} # 'system' checks the base image first, else installs 'la
|
||||||
USE_PPA_IF_AVAILABLE=${PPA}
|
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:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -25,26 +25,9 @@ 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}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
# Import the specified key in a variable name passed in as
|
||||||
receive_gpg_keys() {
|
receive_gpg_keys() {
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
local keys=${!1}
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
local keyring_args=""
|
local keyring_args=""
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
mkdir -p "$(dirname \"$2\")"
|
mkdir -p "$(dirname \"$2\")"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "github-cli",
|
"id": "github-cli",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"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.",
|
||||||
|
|
|
@ -11,7 +11,7 @@ CLI_VERSION=${VERSION:-"latest"}
|
||||||
INSTALL_DIRECTLY_FROM_GITHUB_RELEASE=${INSTALLDIRECTLYFROMGITHUBRELEASE:-"true"}
|
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:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -25,58 +25,10 @@ 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}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
# Import the specified key in a variable name passed in as
|
||||||
receive_gpg_keys() {
|
receive_gpg_keys() {
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
local keys=${!1}
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
|
|
||||||
# Use a temporary locaiton for gpg keys to avoid polluting image
|
|
||||||
export GNUPGHOME="/tmp/tmp-gnupg"
|
|
||||||
mkdir -p ${GNUPGHOME}
|
|
||||||
chmod 700 ${GNUPGHOME}
|
|
||||||
echo -e "disable-ipv6\n${GPG_KEY_SERVERS}" > ${GNUPGHOME}/dirmngr.conf
|
|
||||||
# GPG key download sometimes fails for some reason and retrying fixes it.
|
|
||||||
local retry_count=0
|
|
||||||
local gpg_ok="false"
|
|
||||||
set +e
|
|
||||||
until [ "${gpg_ok}" = "true" ] || [ "${retry_count}" -eq "5" ];
|
|
||||||
do
|
|
||||||
echo "(*) Downloading GPG key..."
|
|
||||||
( echo "${keys}" | xargs -n 1 gpg --recv-keys) 2>&1 && gpg_ok="true"
|
|
||||||
if [ "${gpg_ok}" != "true" ]; then
|
|
||||||
echo "(*) Failed getting key, retring in 10s..."
|
|
||||||
(( retry_count++ ))
|
|
||||||
sleep 10s
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
set -e
|
|
||||||
if [ "${gpg_ok}" = "false" ]; then
|
|
||||||
echo "(!) Failed to get gpg key."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
|
||||||
receive_gpg_keys() {
|
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
local keyring_args=""
|
local keyring_args=""
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
keyring_args="--no-default-keyring --keyring $2"
|
keyring_args="--no-default-keyring --keyring $2"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "kubectl-helm-minikube",
|
"id": "kubectl-helm-minikube",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"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.",
|
||||||
|
|
|
@ -22,7 +22,7 @@ MINIKUBE_SHA256="${MINIKUBE_SHA256:-"automatic"}"
|
||||||
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
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:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -53,22 +53,6 @@ if [ "$USERNAME" = "root" ]; then
|
||||||
USERHOME="/root"
|
USERHOME="/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
|
||||||
|
@ -182,8 +166,6 @@ curl -sSL "https://github.com/helm/helm/releases/download/${HELM_VERSION}/${helm
|
||||||
export GNUPGHOME="/tmp/helm/gnupg"
|
export GNUPGHOME="/tmp/helm/gnupg"
|
||||||
mkdir -p "${GNUPGHOME}"
|
mkdir -p "${GNUPGHOME}"
|
||||||
chmod 700 ${GNUPGHOME}
|
chmod 700 ${GNUPGHOME}
|
||||||
get_common_setting HELM_GPG_KEYS_URI
|
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
curl -sSL "${HELM_GPG_KEYS_URI}" -o /tmp/helm/KEYS
|
curl -sSL "${HELM_GPG_KEYS_URI}" -o /tmp/helm/KEYS
|
||||||
echo -e "disable-ipv6\n${GPG_KEY_SERVERS}" > ${GNUPGHOME}/dirmngr.conf
|
echo -e "disable-ipv6\n${GPG_KEY_SERVERS}" > ${GNUPGHOME}/dirmngr.conf
|
||||||
gpg -q --import "/tmp/helm/KEYS"
|
gpg -q --import "/tmp/helm/KEYS"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "nix",
|
"id": "nix",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"name": "Nix Package Manager",
|
"name": "Nix Package Manager",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/nix",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/nix",
|
||||||
"description": "Installs the Nix package manager and optionally a set of packages.",
|
"description": "Installs the Nix package manager and optionally a set of packages.",
|
||||||
|
|
|
@ -14,7 +14,7 @@ USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
|
||||||
|
|
||||||
# Nix keys for securly verifying installer download signature per https://nixos.org/download.html#nix-verify-installation
|
# Nix keys for securly verifying installer download signature per https://nixos.org/download.html#nix-verify-installation
|
||||||
NIX_GPG_KEYS="B541D55301270E0BCF15CA5D8170B4726D7198DE"
|
NIX_GPG_KEYS="B541D55301270E0BCF15CA5D8170B4726D7198DE"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
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": "powershell",
|
"id": "powershell",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"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.",
|
||||||
|
|
|
@ -17,7 +17,7 @@ POWERSHELL_VERSION=${VERSION:-"latest"}
|
||||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
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:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -60,21 +60,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
|
||||||
|
@ -95,7 +80,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=$(dpkg --print-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=$(dpkg --print-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
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "python",
|
"id": "python",
|
||||||
"version": "1.0.17",
|
"version": "1.0.18",
|
||||||
"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.",
|
||||||
|
|
|
@ -28,7 +28,7 @@ ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
|
||||||
|
|
||||||
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv")
|
DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv")
|
||||||
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"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -76,26 +76,9 @@ updaterc() {
|
||||||
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}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
# Import the specified key in a variable name passed in as
|
||||||
receive_gpg_keys() {
|
receive_gpg_keys() {
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
local keys=${!1}
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
local keyring_args=""
|
local keyring_args=""
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
mkdir -p "$(dirname \"$2\")"
|
mkdir -p "$(dirname \"$2\")"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "ruby",
|
"id": "ruby",
|
||||||
"version": "1.0.7",
|
"version": "1.0.8",
|
||||||
"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.",
|
||||||
|
|
|
@ -22,7 +22,7 @@ ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
|
||||||
DEFAULT_GEMS="rake ruby-debug-ide"
|
DEFAULT_GEMS="rake ruby-debug-ide"
|
||||||
|
|
||||||
RVM_GPG_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
RVM_GPG_KEYS="409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
|
||||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com
|
||||||
keyserver hkps://keys.openpgp.org
|
keyserver hkps://keys.openpgp.org
|
||||||
keyserver hkp://keyserver.pgp.com"
|
keyserver hkp://keyserver.pgp.com"
|
||||||
|
|
||||||
|
@ -70,26 +70,9 @@ updaterc() {
|
||||||
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}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Import the specified key in a variable name passed in as
|
# Import the specified key in a variable name passed in as
|
||||||
receive_gpg_keys() {
|
receive_gpg_keys() {
|
||||||
get_common_setting $1
|
|
||||||
local keys=${!1}
|
local keys=${!1}
|
||||||
get_common_setting GPG_KEY_SERVERS true
|
|
||||||
local keyring_args=""
|
local keyring_args=""
|
||||||
if [ ! -z "$2" ]; then
|
if [ ! -z "$2" ]; then
|
||||||
keyring_args="--no-default-keyring --keyring \"$2\""
|
keyring_args="--no-default-keyring --keyring \"$2\""
|
||||||
|
|
11
test/github-cli/install_git_cli_from_release.sh
Normal file
11
test/github-cli/install_git_cli_from_release.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Optional: Import test library
|
||||||
|
source dev-container-features-test-lib
|
||||||
|
|
||||||
|
check "version" gh --version
|
||||||
|
|
||||||
|
# Report result
|
||||||
|
reportResults
|
11
test/github-cli/scenarios.json
Normal file
11
test/github-cli/scenarios.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"install_git_cli_from_release": {
|
||||||
|
"image": "ubuntu:focal",
|
||||||
|
"features": {
|
||||||
|
"github-cli": {
|
||||||
|
"version": "latest",
|
||||||
|
"installDirectlyFromGitHubRelease": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue