Compare commits

..

26 commits

Author SHA1 Message Date
768d4c8398 Удалить .woodpecker.yaml 2024-01-05 04:35:25 +03:00
0a4f338966 Обновить .woodpecker.yaml
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2024-01-05 04:34:48 +03:00
297c9da2d8 Обновить .woodpecker.yaml 2024-01-05 04:33:19 +03:00
f0abbb5ccd Обновить .woodpecker.yaml 2024-01-05 04:32:46 +03:00
fd426c9ceb Обновить .woodpecker.yaml 2024-01-05 04:31:51 +03:00
dfb174d4e4 Добавить .woodpecker.yaml 2024-01-05 04:31:32 +03:00
Josh Spicer
3ea4d6bbd7
Fix .zprofile is owned by root (#775)
* revert behavior of sourcing .profile in .zprofile

https://github.com/devcontainers/features/pull/736/files#diff-3e71c0a0669a0410f7dd0d8f2b83f3b6bf6b525d3eabd354f19f32822da669fcR460-R463

* add test

* increment version

* create empty .zprofile is not present, and fix test

* temporarily add back .profile to .zprofile (only if file did not exist)
2023-12-07 10:49:18 -08:00
Philipp Wagner
def3a41f57
Fix common-utils installation on RHEL (and friends) (#772)
* Fix indentation in common-utils/main.sh

* common-utils: Fix install error on RHEL

On RHEL (and derivatives) the installation of the common-utils feature
could fail if the feature ran before (i.e., `PACKAGES_ALREADY_INSTALLED`
is set) and if either `INSTALL_ZSH` is false, or zsh was installed
earlier and `ZSH_ALREADY_INSTALLED` is true.

In these cases the script the `package_list` is empty, and `dnf`
terminates with the following error message:

```
usage: dnf install [-c [config file]] [-q] [-v] [--version]
                   [--installroot [path]] [--nodocs] [--noplugins]
                   [--enableplugin [plugin]] [--disableplugin [plugin]]
                   [--releasever RELEASEVER] [--setopt SETOPTS]
                   [--skip-broken] [-h] [--allowerasing] [-b | --nobest] [-C]
                   [-R [minutes]] [-d [debug level]] [--debugsolver]
                   [--showduplicates] [-e ERRORLEVEL] [--obsoletes]
                   [--rpmverbosity [debug level name]] [-y] [--assumeno]
                   [--enablerepo [repo]] [--disablerepo [repo] | --repo
                   [repo]] [--enable | --disable] [-x [package]]
                   [--disableexcludes [repo]] [--repofrompath [repo,path]]
                   [--noautoremove] [--nogpgcheck] [--color COLOR] [--refresh]
                   [-4] [-6] [--destdir DESTDIR] [--downloadonly]
                   [--comment COMMENT] [--bugfix] [--enhancement]
                   [--newpackage] [--security] [--advisory ADVISORY]
                   [--bz BUGZILLA] [--cve CVES]
                   [--sec-severity {Critical,Important,Moderate,Low}]
                   [--forcearch ARCH]
                   PACKAGE [PACKAGE ...]
dnf install: error: the following arguments are required: PACKAGE
```

Fix the problem by running `dnf` only with a non-zero `package_list`.
2023-12-05 17:02:58 -08:00
Dev containers Bot
d53b9d1816
[Updates] Automated vendor dotnet-install script (#750)
* Automated dotnet-install script update

* Bump version

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-14 09:56:03 -08:00
Dev containers Bot
710103a638
Automated documentation update (#738)
Automated documentation update [skip ci]

Co-authored-by: github-actions <github-actions@github.com>
2023-10-30 10:20:06 -07:00
Oscar
7324b6d03c
Remove rebornix.Ruby extension (#737)
Remove the deprecated rebornix.Ruby extension from the list of installed extensions.
2023-10-30 10:16:28 -07:00
Samruddhi Khandale
d4ecc7be06
Update Features - Remove use of get_common_setting (#735) 2023-10-27 15:47:44 -07:00
Samruddhi Khandale
719901a1b4
[common-utils] Bug fix: zsh missing rc snippet (#736)
* [common-utils] Bug fix: zsp missing rc snippet

* condion rc snippet

* fix bug

* remove debugging step
2023-10-27 15:47:26 -07:00
Dev containers Bot
4c2c9f7b95
Automated documentation update (#732)
Automated documentation update [skip ci]

Co-authored-by: github-actions <github-actions@github.com>
2023-10-23 16:14:35 -07:00
Lyon Till
e645120a39
Add PowerShell extension (#731)
* Add PowerShell extension

* Bump feature version
2023-10-23 16:08:27 -07:00
Richard Höchenberger
1155a9906b
Try connecting to Ubuntu keyserver on port 80 if default HKP port fails (#722)
* Try Ubuntu keyserver on port 80 if default HKP port fails

Closes #719
Closes #717

* Bump feature versions

---------

Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
2023-10-17 23:45:04 +00:00
Samruddhi Khandale
36a3604b90
[Python] - Support 3.12 (#726) 2023-10-17 15:05:01 -07:00
Samruddhi Khandale
4fca96b5e8
[Docker-in-docker] Updates docker-init scripts (#715)
* updates

* version bump
2023-10-05 11:27:01 -07:00
Jan-Marco Edelmann
0d7ad7c5fc
Configure npm proxy when proxy environmentals exist (#712) 2023-10-04 15:09:35 -07:00
Alexander Smolyakov
90a9b1d604
[terraform] Update retry logic to handle DNS-related errors more gracefully (#713)
* [terraform] Update retry logic

- Add `dnsutils` package to dependencies
- Update retry logic to handle DNS-related errors more gracefully

* Update install.sh

* Bump version
2023-10-04 10:00:11 -07:00
Luciana Abud
c3f9105048
Remove deprecated Python settings (#625)
* Remove deprecated Python settings

* No longer install Python linters and formatters

* Revert "No longer install Python linters and formatters"

This reverts commit 57c7bec14d.

* Bump minor version
2023-10-02 08:59:25 -07:00
Samruddhi Khandale
04cb7d1e79
Docker-in-docker: Updates docker-init with "pkill" (#711)
* Docker-in-docker: Updates docker-init with "pkill"

* pkill only if container didn't start at first

* pkill with condition

* add back sudo_if
2023-09-29 12:02:54 -07:00
Samruddhi Khandale
cf92754bf4
Automated documentation update (#709)
Automated documentation update [skip ci]

Co-authored-by: github-actions <github-actions@github.com>
2023-09-29 11:50:09 -07:00
Steven
803ec6e0e5
Bump the dotnet version after a script update (#707)
* Bump the dotnet version after a script update

* Forgot to add file

* Keep 4 spaces indentation
2023-09-28 10:50:20 -07:00
Samruddhi Khandale
0599c63f8f
[Updates] Automated vendor dotnet-install script (#698)
* Automated dotnet-install script update

* version bump

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-09-28 10:08:39 -07:00
Samruddhi Khandale
3aad9a72f4
Terraform - Adds licensing information (#697)
* Terraform - Adds licensing information

* Update src/terraform/NOTES.md

Co-authored-by: Brigit Murtaugh <brigit.murtaugh@microsoft.com>

---------

Co-authored-by: Brigit Murtaugh <brigit.murtaugh@microsoft.com>
2023-09-28 09:59:04 -07:00
44 changed files with 268 additions and 166 deletions

View file

@ -1,18 +1,17 @@
{
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
"remoteUser": "node",
"customizations": {
"vscode": {
"extensions": [
"mads-hartmann.bash-ide-vscode"
]
}
},
"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
},
"customizations": {
"vscode": {
"extensions": [
"mads-hartmann.bash-ide-vscode"
]
}
}
}

View file

@ -35,8 +35,11 @@ jobs:
git add src/dotnet/scripts/vendor/dotnet-install.sh
git commit -m 'Automated dotnet-install script update' || export NO_UPDATES=true
# Push
# Bump version and 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 \

View file

@ -1,6 +1,6 @@
{
"id": "aws-cli",
"version": "1.0.6",
"version": "1.0.7",
"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.",

View file

@ -50,21 +50,6 @@ 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..."
@ -89,9 +74,6 @@ 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}"

View file

@ -1,6 +1,6 @@
{
"id": "azure-cli",
"version": "1.2.1",
"version": "1.2.2",
"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.",

View file

@ -32,21 +32,6 @@ 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..."
@ -110,7 +95,6 @@ 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

View file

@ -1,6 +1,6 @@
{
"id": "common-utils",
"version": "2.2.0",
"version": "2.3.1",
"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.",

View file

@ -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,7 +222,9 @@ install_redhat_packages() {
package_list="${package_list} zsh"
fi
${install_cmd} -y install ${package_list}
if [ -n "${package_list}" ]; then
${install_cmd} -y install ${package_list}
fi
# Get to latest versions of all packages
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
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
@ -456,13 +459,19 @@ 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" >> /etc/zshrc
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
ZSH_ALREADY_INSTALLED="true"
fi

View file

@ -1,6 +1,6 @@
{
"id": "docker-in-docker",
"version": "2.5.0",
"version": "2.7.1",
"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.",

View file

@ -57,21 +57,6 @@ 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
@ -137,8 +122,6 @@ 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}"
@ -146,7 +129,6 @@ 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}"
@ -177,7 +159,6 @@ 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
@ -363,7 +344,6 @@ 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 || :
@ -444,6 +424,16 @@ 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"
@ -467,8 +457,12 @@ do
retry_count=`expr $retry_count + 1`
done
if [ "${docker_ok}" != "true" ]; then
if [ "${docker_ok}" != "true" ] && [ "${retry_docker_start_count}" != "4" ]; 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`

View file

@ -1,6 +1,6 @@
{
"id": "docker-outside-of-docker",
"version": "1.3.0",
"version": "1.3.1",
"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.",

View file

@ -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="buster bullseye bionic focal jammy"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal jammy"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="bookworm buster bullseye bionic focal hirsute impish jammy"
set -e
@ -48,21 +48,6 @@ 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
@ -129,8 +114,6 @@ 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}"
@ -138,7 +121,6 @@ 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}"
@ -153,7 +135,6 @@ 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

View file

@ -1,6 +1,6 @@
{
"id": "dotnet",
"version": "2.0.0",
"version": "2.0.2",
"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.",

View file

@ -314,6 +314,10 @@ get_machine_architecture() {
echo "ppc64le"
return 0
;;
loongarch64)
echo "loongarch64"
return 0
;;
esac
fi
@ -355,6 +359,10 @@ 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"
@ -415,8 +423,13 @@ 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, 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
;;
esac
@ -546,6 +559,40 @@ 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
@ -914,14 +961,39 @@ 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")"
@ -931,9 +1003,13 @@ 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"
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
if [ -z ${keep_zip+x} ]; then
rm -f "$zip_path" && say_verbose "Temporary zip file $zip_path was removed"
fi
if [ "$failed" = true ]; then
say_err "Extraction failed"
@ -1427,9 +1503,10 @@ install_dotnet() {
eval $invocation
local download_failed=false
local download_completed=false
local remote_file_size=0
mkdir -p "$install_root"
zip_path="$(mktemp "$temporary_file_template")"
zip_path="${zip_path:-$(mktemp "$temporary_file_template")}"
say_verbose "Zip path: $zip_path"
for link_index in "${!download_links[@]}"
@ -1467,8 +1544,10 @@ 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" || 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.
# 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
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"
@ -1663,7 +1750,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 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 " 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."
@ -1688,6 +1775,8 @@ 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:"

View file

@ -1,6 +1,6 @@
{
"id": "git-lfs",
"version": "1.1.0",
"version": "1.1.1",
"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.",

View file

@ -15,6 +15,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "git",
"version": "1.1.5",
"version": "1.1.6",
"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.",

View file

@ -12,6 +12,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "github-cli",
"version": "1.0.10",
"version": "1.0.11",
"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.",

View file

@ -12,6 +12,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "go",
"version": "1.2.1",
"version": "1.2.2",
"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.",

View file

@ -84,21 +84,6 @@ 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
@ -148,7 +133,6 @@ 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}..."

View file

@ -1,6 +1,6 @@
{
"id": "kubectl-helm-minikube",
"version": "1.1.4",
"version": "1.1.5",
"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.",

View file

@ -23,6 +23,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "node",
"version": "1.3.0",
"version": "1.3.1",
"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.",

View file

@ -228,6 +228,9 @@ 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"

View file

@ -18,6 +18,12 @@ 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

View file

@ -1,6 +1,6 @@
{
"id": "powershell",
"version": "1.1.0",
"version": "1.2.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,9 +19,16 @@
"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"
]
}
}

View file

@ -19,6 +19,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "python",
"version": "1.2.0",
"version": "1.3.1",
"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,6 +11,7 @@
"latest",
"os-provided",
"none",
"3.12",
"3.11",
"3.10",
"3.9",
@ -65,15 +66,7 @@
"ms-python.vscode-pylance"
],
"settings": {
"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
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python"
}
}
},

View file

@ -27,8 +27,9 @@ 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"
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
keyserver hkp://keyserver.ubuntu.com:80
keyserver hkps://keys.openpgp.org
keyserver hkp://keyserver.pgp.com"

View file

@ -21,7 +21,6 @@ Installs Ruby, rvm, rbenv, common Ruby utilities, and needed dependencies.
### VS Code Extensions
- `rebornix.Ruby`
- `shopify.ruby-lsp`

View file

@ -1,6 +1,6 @@
{
"id": "ruby",
"version": "1.1.1",
"version": "1.2.0",
"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,7 +21,6 @@
"customizations": {
"vscode": {
"extensions": [
"rebornix.Ruby",
"shopify.ruby-lsp"
]
}

View file

@ -24,6 +24,7 @@ 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"

View file

@ -1,6 +1,6 @@
{
"id": "rust",
"version": "1.1.0",
"version": "1.1.1",
"name": "Rust",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/rust",
"description": "Installs Rust, common Rust utilities, and their required dependencies",

View file

@ -48,21 +48,6 @@ 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

View file

@ -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
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.

View file

@ -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
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.

View file

@ -1,6 +1,6 @@
{
"id": "terraform",
"version": "1.3.4",
"version": "1.3.5",
"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.",

View file

@ -77,6 +77,25 @@ 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."
@ -183,7 +202,7 @@ ensure_cosign() {
export DEBIAN_FRONTEND=noninteractive
# 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
check_packages git
fi

View file

@ -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 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

View file

@ -108,12 +108,14 @@
}
},
"configure_zsh_as_default_shell": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"image": "ubuntu",
"features": {
"common-utils": {
"installZsh": true,
"configureZshAsDefaultShell": true
}
}
},
"remoteUser": "devcontainer"
},
"configure_zsh_no_template_second_step": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",

View 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

View file

@ -32,7 +32,7 @@
}
},
"install_os_provided_python": {
"image": "mcr.microsoft.com/devcontainers/base:0-bullseye",
"image": "mcr.microsoft.com/devcontainers/base:1-bullseye",
"features": {
"python": "os-provided"
}
@ -73,5 +73,13 @@
"configureJupyterlabAllowOrigin": "*"
}
}
},
"install_python_3_12": {
"image": "mcr.microsoft.com/devcontainers/base:1-ubuntu-22.04",
"features": {
"python": {
"version": "3.12"
}
}
}
}