Unverified Commit c12a205a authored by Josh Spicer's avatar Josh Spicer Committed by GitHub

Pass options via environment variables (#39)

* up to docker-in-docker converted

* first pass at the rest of the features (and bash linting and updated CLI

* move shell linter to own file

* rename feature.json -> devcontainer-feature.json

* continue on error

* continue on error in right spot

* formatting

* fix AZ_VERSION

* update python

* restore variable name

* update linter actions, fix dind/dfd/desktop scripts, add test-scenaerios

* add tree because I like tree

* glob for shell linter

* fix test-scenarios

* shell linter

* more shell helper
parent 283b8e1f
name: "Shell script linter"
on:
push:
branches:
- main
pull_request:
jobs:
shellchecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Shell Linter
uses: azohra/shell-linter@v0.6.0
with:
path: "src/**/*.sh"
severity: "error" # [style, info, warning, error]
\ No newline at end of file
name: "Shell script linter (manual)"
on:
workflow_dispatch:
inputs:
path:
description: "Path to the shell scripts to lint"
required: true
default: "src/**/*.sh"
severity:
description: "Minimum Severity (style, info, warning, error)"
required: true
default: "style"
jobs:
shellchecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Shell Linter
uses: azohra/shell-linter@v0.6.0
with:
path: ${{ github.event.inputs.path }}
severity: ${{ github.event.inputs.severity }}
\ No newline at end of file
...@@ -41,10 +41,18 @@ jobs: ...@@ -41,10 +41,18 @@ jobs:
test: test:
needs: detect-changes needs: detect-changes
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true
strategy: strategy:
matrix: matrix:
features: ${{ fromJSON(needs.detect-changes.outputs.features) }} features: ${{ fromJSON(needs.detect-changes.outputs.features) }}
baseImage: [ "ubuntu:focal", "ubuntu:jammy", "debian:11", "mcr.microsoft.com/vscode/devcontainers/base:ubuntu", "mcr.microsoft.com/vscode/devcontainers/base:debian" ] baseImage:
[
"ubuntu:focal",
"ubuntu:jammy",
"debian:11",
"mcr.microsoft.com/vscode/devcontainers/base:ubuntu",
"mcr.microsoft.com/vscode/devcontainers/base:debian",
]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: " Testing '${{ matrix.features }}' against '${{ matrix.baseImage }}'" - name: " Testing '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
......
name: "Test Scenarios"
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
scenarios:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: " Running predefined test scenarios"
run: npx --yes ./devcontainers-cli-0.3.0.tgz features test --scenarios `pwd`/test-scenarios -c `pwd`
...@@ -4,7 +4,7 @@ detect_user() { ...@@ -4,7 +4,7 @@ detect_user() {
local possible_users=${2:-("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")} local possible_users=${2:-("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")}
if [ "${!user_variable_name}" = "auto" ] || [ "${!user_variable_name}" = "automatic" ]; then if [ "${!user_variable_name}" = "auto" ] || [ "${!user_variable_name}" = "automatic" ]; then
declare -g ${user_variable_name}="" declare -g ${user_variable_name}=""
for current_user in ${possible_users[@]}; do for current_user in "${POSSIBLE_USERS[@]}"; do
if id -u "${current_user}" > /dev/null 2>&1; then if id -u "${current_user}" > /dev/null 2>&1; then
declare -g ${user_variable_name}="${current_user}" declare -g ${user_variable_name}="${current_user}"
break break
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/anaconda.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/anaconda.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./anaconda-debian.sh [Conda version] [Non-root user] [Add rc files flag]
VERSION=${1:-"latest"}
USERNAME=${2:-"automatic"}
UPDATE_RC=${3:-"true"}
VERSION=${VERSION:-"latest"}
USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${UPDATE_RC:-"true"}
CONDA_DIR=${CONDA_DIR:-"/usr/local/conda"} CONDA_DIR=${CONDA_DIR:-"/usr/local/conda"}
set -eux set -eux
...@@ -32,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -32,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/awscli.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/awscli.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./awscli-debian.sh [AWS CLI version]
set -e set -e
AWSCLI_VERSION=${1:-"latest"} VERSION=${VERSION:-"latest"}
AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C
AWSCLI_GPG_KEY_MATERIAL="-----BEGIN PGP PUBLIC KEY BLOCK----- AWSCLI_GPG_KEY_MATERIAL="-----BEGIN PGP PUBLIC KEY BLOCK-----
...@@ -108,8 +107,8 @@ install() { ...@@ -108,8 +107,8 @@ install() {
local scriptSigFile=awscli.sig local scriptSigFile=awscli.sig
# See Linux install docs at https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html # See Linux install docs at https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
if [ "${AWSCLI_VERSION}" != "latest" ]; then if [ "${VERSION}" != "latest" ]; then
local versionStr=-${AWSCLI_VERSION} local versionStr=-${VERSION}
fi fi
architecture=$(dpkg --print-architecture) architecture=$(dpkg --print-architecture)
case "${architecture}" in case "${architecture}" in
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/azcli.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/azcli.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./azcli-debian.sh
set -e set -e
AZ_VERSION=${1:-"latest"} AZ_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"
AZCLI_ARCHIVE_ARCHITECTURES="amd64" AZCLI_ARCHIVE_ARCHITECTURES="amd64"
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal" AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
......
...@@ -3,42 +3,53 @@ ...@@ -3,42 +3,53 @@
"name": "common", "name": "common",
"description": "common", "description": "common",
"options": { "options": {
"installZsh": { "install_Zsh": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Install ZSH?" "description": "Install ZSH?"
}, },
"installOhMyZsh": { "install_Oh_My_Zsh": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Install Oh My Zsh!?" "description": "Install Oh My Zsh!?"
}, },
"upgradePackages": { "upgrade_packages": {
"type":"boolean", "type": "boolean",
"default": true, "default": true,
"description": "Upgrade OS packages?" "description": "Upgrade OS packages?"
}, },
"username": { "username": {
"type":"string", "type": "string",
"proposals": ["vscode", "codespace", "none", "automatic"], "proposals": [
"vscode",
"codespace",
"none",
"automatic"
],
"default": "automatic", "default": "automatic",
"description": "Enter name of non-root user to configure or none to skip" "description": "Enter name of non-root user to configure or none to skip"
}, },
"uid": { "user_uid": {
"type":"string", "type": "string",
"proposals": ["1000", "automatic"], "proposals": [
"1000",
"automatic"
],
"default": "automatic", "default": "automatic",
"description": "Enter uid for non-root user" "description": "Enter uid for non-root user"
}, },
"gid": { "user_gid": {
"type": "string", "type": "string",
"proposals": ["1000", "automatic"], "proposals": [
"1000",
"automatic"
],
"default": "automatic", "default": "automatic",
"description": "Enter gid for non-root user" "description": "Enter gid for non-root user"
}, },
"nonFreePackages": { "add_non_free_packages": {
"type":"boolean", "type": "boolean",
"default": true, "default": false,
"description": "Add packages from non-free Debian repository?" "description": "Add packages from non-free Debian repository?"
} }
}, },
......
...@@ -6,18 +6,17 @@ ...@@ -6,18 +6,17 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My Zsh! flag] [Add non-free packages]
set -e set -e
INSTALL_ZSH=${1:-"true"} INSTALL_ZSH=${INSTALL_ZSH:-"true"}
USERNAME=${2:-"automatic"} INSTALL_OH_MY_ZSH=${INSTALL_OH_MY_ZSH:-"true"}
USER_UID=${3:-"automatic"} UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-"true"}
USER_GID=${4:-"automatic"} USERNAME=${USERNAME:-"automatic"}
UPGRADE_PACKAGES=${5:-"true"} USER_UID=${USER_UID:-"automatic"}
INSTALL_OH_MYS=${6:-"true"} USER_GID=${USER_GID:-"automatic"}
ADD_NON_FREE_PACKAGES=${7:-"false"} ADD_NON_FREE_PACKAGES=${ADD_NON_FREE_PACKAGES:-"false"}
SCRIPT_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)" SCRIPT_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)"
MARKER_FILE="/usr/local/etc/vscode-dev-containers/common" MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
...@@ -35,7 +34,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -35,7 +34,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
...@@ -85,6 +84,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then ...@@ -85,6 +84,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
net-tools \ net-tools \
psmisc \ psmisc \
curl \ curl \
tree \
wget \ wget \
rsync \ rsync \
ca-certificates \ ca-certificates \
...@@ -376,7 +376,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then ...@@ -376,7 +376,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
# Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme. # Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme.
# See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script. # See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script.
oh_my_install_dir="${user_rc_path}/.oh-my-zsh" oh_my_install_dir="${user_rc_path}/.oh-my-zsh"
if [ ! -d "${oh_my_install_dir}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then if [ ! -d "${oh_my_install_dir}" ] && [ "${INSTALL_OH_MY_ZSH}" = "true" ]; then
template_path="${oh_my_install_dir}/templates/zshrc.zsh-template" template_path="${oh_my_install_dir}/templates/zshrc.zsh-template"
user_rc_file="${user_rc_path}/.zshrc" user_rc_file="${user_rc_path}/.zshrc"
umask g-w,o-w umask g-w,o-w
......
...@@ -4,25 +4,43 @@ ...@@ -4,25 +4,43 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"enum": ["latest"], "proposals": [
"latest"
],
"default": "latest", "default": "latest",
"description": "Currently unused." "description": "Currently Unused!"
}, },
"password": { "novnc_version": {
"type": "string", "type": "string",
"proposals": ["vscode","codespaces","password"], "proposals": [
"1.2.0"
],
"default": "1.2.0",
"description": "NoVnc Version"
},
"vnc_password": {
"type": "string",
"proposals": [
"vscode",
"codespaces",
"password"
],
"default": "vscode", "default": "vscode",
"description": "Enter a password for desktop connections" "description": "Enter a password for desktop connections"
}, },
"webPort": { "novnc_port": {
"type": "string", "type": "string",
"proposals": ["6080"], "proposals": [
"6080"
],
"default": "6080", "default": "6080",
"description": "Enter a port for the desktop web client" "description": "Enter a port for the VNC web client"
}, },
"vncPort": { "vnc_port": {
"type": "string", "type": "string",
"proposals": ["5901"], "proposals": [
"5901"
],
"default": "5901", "default": "5901",
"description": "Enter a port for the desktop VNC server" "description": "Enter a port for the desktop VNC server"
} }
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/desktop-lite.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/desktop-lite.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./desktop-lite-debian.sh [non-root user] [Desktop password] [Install web client flag] [VNC port] [Web Port]
USERNAME=${1:-"automatic"} NOVNC_VERSION=${NOVNC_VERSION:-"1.2.0"} # TODO: Add in a 'latest' auto-detect and swap name to 'version'
VNC_PASSWORD=${2:-"vscode"} VNC_PASSWORD=${VNC_PASSWORD:-"vscode"}
INSTALL_NOVNC=${3:-"true"} NOVNC_PORT="${NOVNC_PORT:-6080}"
VNC_PORT="${4:-5901}" VNC_PORT="${VNC_PORT:-5901}"
NOVNC_PORT="${5:-6080}"
INSTALL_NOVNC=${INSTALL_NOVNC:-"true"}
USERNAME=${USERNAME:-"automatic"}
NOVNC_VERSION=1.2.0
WEBSOCKETIFY_VERSION=0.10.0 WEBSOCKETIFY_VERSION=0.10.0
package_list=" package_list="
...@@ -72,7 +72,7 @@ fi ...@@ -72,7 +72,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "none", "20.10"], "proposals": [
"latest",
"none",
"20.10"
],
"default": "latest", "default": "latest",
"description": "Select or enter a Docker/Moby CLI version. (Availability can vary by OS version.)" "description": "Select or enter a Docker/Moby CLI version. (Availability can vary by OS version.)"
}, },
...@@ -13,9 +17,12 @@ ...@@ -13,9 +17,12 @@
"default": true, "default": true,
"description": "Install OSS Moby build instead of Docker CE" "description": "Install OSS Moby build instead of Docker CE"
}, },
"dockerDashComposeVersion": { "docker_dash_compose_version": {
"type": "string", "type": "string",
"enum": ["v1", "v2" ], "enum": [
"v1",
"v2"
],
"default": "v1", "default": "v1",
"description": "Compose version to use for docker-compose (v1 or v2)" "description": "Compose version to use for docker-compose (v1 or v2)"
} }
...@@ -29,9 +36,9 @@ ...@@ -29,9 +36,9 @@
], ],
"mounts": [ "mounts": [
{ {
"source":"/var/run/docker.sock", "source": "/var/run/docker.sock",
"target":"/var/run/docker-host.sock", "target": "/var/run/docker-host.sock",
"type":"bind" "type": "bind"
} }
], ],
"install": { "install": {
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./docker-debian.sh [enable non-root docker socket access flag] [source socket] [target socket] [non-root user] [use moby] [CLI version] [Major version for docker-compose] DOCKER_VERSION=${VERSION:-"latest"}
USE_MOBY=${MOBY:-"true"}
ENABLE_NONROOT_DOCKER=${1:-"true"} DOCKER_DASH_COMPOSE_VERSION=${DOCKER_DASH_COMPOSE_VERSION:-"v1"} # v1 or v2
SOURCE_SOCKET=${2:-"/var/run/docker-host.sock"}
TARGET_SOCKET=${3:-"/var/run/docker.sock"} ENABLE_NONROOT_DOCKER=${ENABLE_NONROOT_DOCKER:-"true"}
USERNAME=${4:-"automatic"} SOURCE_SOCKET=${SOURCE_SOCKET:-"/var/run/docker-host.sock"}
USE_MOBY=${5:-"true"} TARGET_SOCKET=${TARGET_SOCKET:-"/var/run/docker.sock"}
DOCKER_VERSION=${6:-"latest"} USERNAME=${USERNAME:-"automatic"}
DOCKER_DASH_COMPOSE_VERSION=${7:-"v1"} # v1 or v2
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy" DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy" DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
...@@ -31,7 +31,7 @@ fi ...@@ -31,7 +31,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "none", "20.10" ], "proposals": [
"latest",
"none",
"20.10"
],
"default": "latest", "default": "latest",
"description": "Select or enter a Docker/Moby Engine version. (Availability can vary by OS version.)" "description": "Select or enter a Docker/Moby Engine version. (Availability can vary by OS version.)"
}, },
...@@ -13,9 +17,12 @@ ...@@ -13,9 +17,12 @@
"default": true, "default": true,
"description": "Install OSS Moby build instead of Docker CE" "description": "Install OSS Moby build instead of Docker CE"
}, },
"dockerDashComposeVersion": { "docker_dash_compose_version": {
"type": "string", "type": "string",
"enum": ["v1", "v2" ], "enum": [
"v1",
"v2"
],
"default": "v1", "default": "v1",
"description": "Default version of Docker Compose (v1 or v2)" "description": "Default version of Docker Compose (v1 or v2)"
} }
...@@ -30,9 +37,9 @@ ...@@ -30,9 +37,9 @@
], ],
"mounts": [ "mounts": [
{ {
"source":"dind-var-lib-docker", "source": "dind-var-lib-docker",
"target":"/var/lib/docker", "target": "/var/lib/docker",
"type":"volume" "type": "volume"
} }
], ],
"install": { "install": {
......
...@@ -6,14 +6,15 @@ ...@@ -6,14 +6,15 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./docker-in-docker-debian.sh [enable non-root docker access flag] [non-root user] [use moby] [Engine/CLI Version] [Major version for docker-compose]
ENABLE_NONROOT_DOCKER=${1:-"true"}
USERNAME=${2:-"automatic"} DOCKER_VERSION=${VERSION:-"latest"} # The Docker/Moby Engine + CLI should match in version
USE_MOBY=${3:-"true"} USE_MOBY=${MOBY:-"true"}
DOCKER_VERSION=${4:-"latest"} # The Docker/Moby Engine + CLI should match in version DOCKER_DASH_COMPOSE_VERSION=${DOCKER_DASH_COMPOSE_VERSION:-"v1"} # v1 or v2
DOCKER_DASH_COMPOSE_VERSION=${5:-"v1"} # v1 or v2
ENABLE_NONROOT_DOCKER=${ENABLE_NONROOT_DOCKER:-"true"}
USERNAME=${USERNAME:-"automatic"}
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy" DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy" DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
...@@ -40,7 +41,7 @@ fi ...@@ -40,7 +41,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,21 +4,26 @@ ...@@ -4,21 +4,26 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest","6.0","5.0","3.1"], "proposals": [
"latest",
"6.0",
"5.0",
"3.1"
],
"default": "latest", "default": "latest",
"description": "Select or enter a dotnet CLI version. (Available versions may vary by Linux distribution.)" "description": "Select or enter a dotnet CLI version. (Available versions may vary by Linux distribution.)"
}, },
"runtimeOnly": { "runtime_only": {
"type":"boolean", "type": "boolean",
"default": false, "default": false,
"description": "Install just the dotnet runtime if true, and sdk if false." "description": "Install just the dotnet runtime if true, and sdk if false."
}, },
"overrideDefaultVersion": { "override_default_version": {
"type": "boolean", "type": "boolean",
"default": "true", "default": "true",
"description": "If true, overrides existing version (if any) of dotnet on the PATH" "description": "If true, overrides existing version (if any) of dotnet on the PATH"
}, },
"installUsingApt": { "install_using_apt": {
"type": "boolean", "type": "boolean",
"default": "true", "default": "true",
"description": "If true, it installs using apt instead of the release URL" "description": "If true, it installs using apt instead of the release URL"
......
...@@ -6,17 +6,16 @@ ...@@ -6,17 +6,16 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/dotnet.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/dotnet.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./dotnet-debian.sh [.NET version] [.NET runtime only] [non-root user] [add TARGET_DOTNET_ROOT to rc files flag] [.NET root] [access group name] DOTNET_VERSION=${VERSION:-"latest"}
DOTNET_RUNTIME_ONLY=${RUNTIME_ONLY:-"false"}
DOTNET_VERSION=${1:-"latest"} OVERRIDE_DEFAULT_VERSION=${OVERRIDE_DEFAULT_VERSION:-"true"}
DOTNET_RUNTIME_ONLY=${2:-"false"} INSTALL_USING_APT=${INSTALL_USING_APT:-"true"}
USERNAME=${3:-"automatic"}
UPDATE_RC=${4:-"true"} USERNAME=${USERNAME:-"automatic"}
TARGET_DOTNET_ROOT=${5:-"/usr/local/dotnet"} UPDATE_RC=${UPDATE_RC:-"true"}
ACCESS_GROUP=${6:-"dotnet"} TARGET_DOTNET_ROOT=${TARGET_DOTNET_ROOT:-"/usr/local/dotnet"}
OVERRIDE_DEFAULT_VERSION=${7:-"true"} ACCESS_GROUP=${ACCESS_GROUP:-"dotnet"}
INSTALL_USING_APT=${8:-"true"}
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc" MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
DOTNET_ARCHIVE_ARCHITECTURES="amd64" DOTNET_ARCHIVE_ARCHITECTURES="amd64"
......
...@@ -4,9 +4,12 @@ ...@@ -4,9 +4,12 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"enum": ["latest", "none"], "enum": [
"latest",
"none"
],
"default": "latest", "default": "latest",
"description": "Currently unused." "description": "Select version of Git LFS to install"
} }
}, },
"install": { "install": {
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-lfs.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-lfs.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./git-lfs-debian.sh [version]
GIT_LFS_VERSION=${1:-"latest"} GIT_LFS_VERSION=${VERSION:-"latest"}
GIT_LFS_ARCHIVE_GPG_KEY_URI="https://packagecloud.io/github/git-lfs/gpgkey" GIT_LFS_ARCHIVE_GPG_KEY_URI="https://packagecloud.io/github/git-lfs/gpgkey"
GIT_LFS_ARCHIVE_ARCHITECTURES="amd64" GIT_LFS_ARCHIVE_ARCHITECTURES="amd64"
GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal" GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
......
...@@ -6,11 +6,9 @@ ...@@ -6,11 +6,9 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-from-src.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-from-src.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./git-from-src-debian.sh [version] [use PPA if available]
GIT_VERSION=${1:-"latest"} # 'system' checks the base image first, else installs 'latest' GIT_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
USE_PPA_IF_AVAILABLE=${2:-"false"} USE_PPA_IF_AVAILABLE=${PPA:-"false"}
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:80
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "none"], "proposals": [
"latest",
"none"
],
"default": "latest", "default": "latest",
"description": "Select version of the GitHub CLI, if not latest." "description": "Select version of the GitHub CLI, if not latest."
} }
......
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/github.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/github.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./github-debian.sh [version]
CLI_VERSION=${1:-"latest"} CLI_VERSION=${VERSION:-"latest"}
GITHUB_CLI_ARCHIVE_GPG_KEY=C99B11DEB97541F0 GITHUB_CLI_ARCHIVE_GPG_KEY=C99B11DEB97541F0
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80 GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
......
...@@ -6,15 +6,14 @@ ...@@ -6,15 +6,14 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/go.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/go.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./go-debian.sh [Go version] [GOROOT] [GOPATH] [non-root user] [Add GOPATH, GOROOT to rc files flag] [Install tools flag]
TARGET_GO_VERSION=${1:-"latest"} TARGET_GO_VERSION=${VERSION:-"latest"}
TARGET_GOROOT=${2:-"/usr/local/go"}
TARGET_GOPATH=${3:-"/go"} TARGET_GOROOT=${TARGET_GOROOT:-"/usr/local/go"}
USERNAME=${4:-"automatic"} TARGET_GOPATH=${TARGET_GOPATH:-"/go"}
UPDATE_RC=${5:-"true"} USERNAME=${USERNAME:-"automatic"}
INSTALL_GO_TOOLS=${6:-"true"} UPDATE_RC=${UPDATE_RC:-"true"}
INSTALL_GO_TOOLS=${INSTALL_GO_TOOLS:-"true"}
# https://www.google.com/linuxrepositories/ # https://www.google.com/linuxrepositories/
GO_GPG_KEY_URI="https://dl.google.com/linux/linux_signing_key.pub" GO_GPG_KEY_URI="https://dl.google.com/linux/linux_signing_key.pub"
...@@ -35,7 +34,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -35,7 +34,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./hugo-debian.sh [Hugo version] [HUGO_DIR] [Non-root user] [Add rc files flag]
VERSION=${1:-"latest"} VERSION=${VERSION:-"latest"}
USERNAME=${3:-"automatic"}
UPDATE_RC=${4:-"true"} USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${UPDATE_RC:-"true"}
HUGO_DIR=${HUGO_DIR:-"/usr/local/hugo"} HUGO_DIR=${HUGO_DIR:-"/usr/local/hugo"}
...@@ -31,7 +30,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -31,7 +30,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -9,10 +9,11 @@ ...@@ -9,10 +9,11 @@
# #
# Syntax: ./java-debian.sh [JDK version] [SDKMAN_DIR] [non-root user] [Add to rc files flag] # Syntax: ./java-debian.sh [JDK version] [SDKMAN_DIR] [non-root user] [Add to rc files flag]
JAVA_VERSION=${1:-"lts"} JAVA_VERSION=${VERSION:-"lts"}
export SDKMAN_DIR=${2:-"/usr/local/sdkman"}
USERNAME=${3:-"automatic"} export SDKMAN_DIR=${SDKMAN_DIR:-"/usr/local/sdkman"}
UPDATE_RC=${4:-"true"} USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${UPDATE_RC:-"true"}
set -e set -e
...@@ -30,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -30,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -27,7 +27,7 @@ if [ "${is_jdk_8}" = "true" ]; then ...@@ -27,7 +27,7 @@ if [ "${is_jdk_8}" = "true" ]; then
# Determine the appropriate non-root user # Determine the appropriate non-root user
username="" username=""
possible_users=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") possible_users=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for current_user in ${possible_users[@]}; do for current_user in "${POSSIBLE_USERS[@]}"; do
if id -u ${current_user} > /dev/null 2>&1; then if id -u ${current_user} > /dev/null 2>&1; then
username=${current_user} username=${current_user}
break break
......
...@@ -4,13 +4,19 @@ ...@@ -4,13 +4,19 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "3.6.2"], "proposals": [
"latest",
"3.6.2"
],
"default": "latest", "default": "latest",
"description": "Select or enter a jupyterlab version." "description": "Select or enter a jupyterlab version."
}, },
"pythonBinary": { "python_binary": {
"type": "string", "type": "string",
"proposals": ["python", "/usr/local/python/bin/python"], "proposals": [
"python",
"/usr/local/python/bin/python"
],
"default": "python", "default": "python",
"description": "Select or enter the python binary path." "description": "Select or enter the python binary path."
} }
......
...@@ -6,15 +6,14 @@ ...@@ -6,15 +6,14 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/jupyterlab.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/jupyterlab.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./jupyter-debian.sh
set -ex set -ex
VERSION=${1:-"latest"} VERSION=${VERSION:-"latest"}
USERNAME=${2:-"automatic"} PYTHON=${PYTHON_BINARY:-"python"}
PYTHON=${3:-"python"}
ALLOW_ALL_ORIGINS=${4:-""} USERNAME=${USERNAME:-"automatic"}
ALLOW_ALL_ORIGINS=${ALLOW_ALL_ORIGINS:-""}
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
...@@ -25,7 +24,7 @@ fi ...@@ -25,7 +24,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,19 +4,29 @@ ...@@ -4,19 +4,29 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "none", "1.23", "1.22", "1.21"], "proposals": [
"latest",
"none",
"1.23",
"1.22",
"1.21"
],
"default": "latest", "default": "latest",
"description": "Select or enter a Kubernetes version to install" "description": "Select or enter a Kubernetes version to install"
}, },
"helm": { "helm": {
"type": "string", "type": "string",
"proposals": ["latest"], "proposals": [
"latest"
],
"default": "latest", "default": "latest",
"description": "Select or enter a Helm version to install" "description": "Select or enter a Helm version to install"
}, },
"minikube": { "minikube": {
"type": "string", "type": "string",
"proposals": ["latest"], "proposals": [
"latest"
],
"default": "latest", "default": "latest",
"description": "Select or enter a Minikube version to install" "description": "Select or enter a Minikube version to install"
} }
...@@ -26,9 +36,9 @@ ...@@ -26,9 +36,9 @@
], ],
"mounts": [ "mounts": [
{ {
"source":"minikube-config", "source": "minikube-config",
"target":"/home/vscode/.minikube", "target": "/home/vscode/.minikube",
"type":"volume" "type": "volume"
} }
], ],
"install": { "install": {
......
...@@ -6,18 +6,17 @@ ...@@ -6,18 +6,17 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/kubectl-helm.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/kubectl-helm.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./kubectl-helm-debian.sh [kubectl verison] [Helm version] [minikube version] [kubectl SHA256] [Helm SHA256] [minikube SHA256]
set -e set -e
KUBECTL_VERSION="${1:-"latest"}" KUBECTL_VERSION="${VERSION:-"latest"}"
HELM_VERSION="${2:-"latest"}" HELM_VERSION="${HELM:-"latest"}"
MINIKUBE_VERSION="${3:-"none"}" # latest is also valid MINIKUBE_VERSION="${MINIKUBE:-"none"}" # latest is also valid
KUBECTL_SHA256="${4:-"automatic"}"
HELM_SHA256="${5:-"automatic"}" KUBECTL_SHA256="${KUBECTL_SHA256:-"automatic"}"
MINIKUBE_SHA256="${6:-"automatic"}" HELM_SHA256="${HELM_SHA256:-"automatic"}"
USERNAME=${7:-"automatic"} MINIKUBE_SHA256="${MINIKUBE_SHA256:-"automatic"}"
USERNAME=${USERNAME:-"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:80
...@@ -33,7 +32,7 @@ fi ...@@ -33,7 +32,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,24 +4,33 @@ ...@@ -4,24 +4,33 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": [ "lts", "latest", "none", "18", "16", "14" ], "proposals": [
"lts",
"latest",
"none",
"18",
"16",
"14"
],
"default": "lts", "default": "lts",
"description": "Select or enter a Node.js version to install" "description": "Select or enter a Node.js version to install"
}, },
"nodeGypDependencies": { "install_tools_for_node_gyp": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Install dependencies to compile native node modules (node-gyp)?" "description": "Install dependencies to compile native node modules (node-gyp)?"
}, },
"nvmInstallPath": { "nvm_install_path": {
"type": "string", "type": "string",
"default": "/usr/local/share/nvm", "default": "/usr/local/share/nvm",
"description": "The path where NVM will be installed." "description": "The path where NVM will be installed."
} }
}, },
"extensions": ["dbaeumer.vscode-eslint"], "extensions": [
"dbaeumer.vscode-eslint"
],
"containerEnv": { "containerEnv": {
"NVM_DIR":"/usr/local/share/nvm", "NVM_DIR": "/usr/local/share/nvm",
"NVM_SYMLINK_CURRENT": "true", "NVM_SYMLINK_CURRENT": "true",
"PATH": "${NVM_DIR}/current/bin:${PATH}" "PATH": "${NVM_DIR}/current/bin:${PATH}"
}, },
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/node.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/node.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./node-debian.sh [directory to install nvm] [node version to install (use "none" to skip)] [non-root user] [Update rc files flag] [install node-gyp deps]
export NVM_DIR=${1:-"/usr/local/share/nvm"} export NODE_VERSION=${VERSION:-"lts"}
export NODE_VERSION=${2:-"lts"} export NVM_DIR=${NVM_INSTALL_PATH:-"/usr/local/share/nvm"}
USERNAME=${3:-"automatic"} INSTALL_TOOLS_FOR_NODE_GYP="${INSTALL_TOOLS_FOR_NODE_GYP:-true}"
UPDATE_RC=${4:-"true"}
INSTALL_TOOLS_FOR_NODE_GYP="${5:-true}" USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${UPDATE_RC:-"true"}
export NVM_VERSION="0.38.0" export NVM_VERSION="0.38.0"
set -e set -e
...@@ -32,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -32,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
"id": "oryx", "id": "oryx",
"name": "Oryx", "name": "Oryx",
"containerEnv": { "containerEnv": {
"PATH":"usr/local/oryx:${PATH}", "PATH": "usr/local/oryx:${PATH}",
"ORYX_SDK_STORAGE_BASE_URL":"https://oryx-cdn.microsoft.io", "ORYX_SDK_STORAGE_BASE_URL": "https://oryx-cdn.microsoft.io",
"ENABLE_DYNAMIC_INSTALL":"true", "ENABLE_DYNAMIC_INSTALL": "true",
"DYNAMIC_INSTALL_ROOT_DIR":"/usr/local" "DYNAMIC_INSTALL_ROOT_DIR": "/usr/local"
}, },
"install": { "install": {
"app": "", "app": "",
......
...@@ -6,11 +6,9 @@ ...@@ -6,11 +6,9 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./oryx-debian.sh [Non-root user]
USERNAME=${1:-"automatic"} USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${2:-"true"} UPDATE_RC=${UPDATE_RC:-"true"}
set -eu set -eu
...@@ -28,7 +26,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -28,7 +26,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,16 +4,19 @@ ...@@ -4,16 +4,19 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "8.0.16"], "proposals": [
"latest",
"8.0.16"
],
"default": "latest", "default": "latest",
"description": "Select or enter a PHP version" "description": "Select or enter a PHP version"
}, },
"installComposer": { "install_composer": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Install PHP Composer?" "description": "Install PHP Composer?"
}, },
"overrideDefaultVersion": { "override_default_version": {
"type": "boolean", "type": "boolean",
"default": "true", "default": "true",
"description": "If true, overrides existing version (if any) of dotnet on the PATH" "description": "If true, overrides existing version (if any) of dotnet on the PATH"
...@@ -27,7 +30,7 @@ ...@@ -27,7 +30,7 @@
], ],
"containerEnv": { "containerEnv": {
"PHP_PATH": "/usr/local/php/current", "PHP_PATH": "/usr/local/php/current",
"PATH":"${PHP_PATH}:${PHP_PATH}/bin:${PATH}" "PATH": "${PHP_PATH}:${PHP_PATH}/bin:${PATH}"
}, },
"install": { "install": {
"app": "", "app": "",
......
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
#------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------
# #
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./php-debian.sh [PHP version] [PHP_DIR] [Add Composer flag] [Non-root user] [Add rc files flag]
VERSION=${1:-"latest"}
export PHP_DIR=${2:-"/usr/local/php"}
INSTALL_COMPOSER=${3:-"true"}
USERNAME=${4:-"automatic"}
UPDATE_RC=${5:-"true"}
OVERRIDE_DEFAULT_VERSION=${6:-"true"}
set -eux set -eux
VERSION=${VERSION:-"latest"}
INSTALL_COMPOSER=${INSTALL_COMPOSER:-"true"}
OVERRIDE_DEFAULT_VERSION=${OVERRIDE_DEFAULT_VERSION:-"true"}
export PHP_DIR=${PHP_DIR:-"/usr/local/php"}
USERNAME=${USERNAME:-"automatic"}
UPDATE_RC=${UPDATE_RC:-"true"}
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
...@@ -33,7 +33,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -33,7 +33,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
"options": { "options": {
"version": { "version": {
"type": "string", "type": "string",
"proposals": ["latest", "none", "7.1"], "proposals": [
"latest",
"none",
"7.1"
],
"default": "latest", "default": "latest",
"description": "Select or enter a version of PowerShell." "description": "Select or enter a version of PowerShell."
} }
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/powershell.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/powershell.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./powershell-debian.sh [version]
set -e set -e
POWERSHELL_VERSION=${1:-"latest"} 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" POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal"
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"default": "os-provided", "default": "os-provided",
"description": "Select a Python version to install." "description": "Select a Python version to install."
}, },
"installTools": { "install_python_tools": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "Install common Python tools like pylint" "description": "Install common Python tools like pylint"
...@@ -33,12 +33,7 @@ ...@@ -33,12 +33,7 @@
"default": "/usr/local/python", "default": "/usr/local/python",
"description": "The path where python will be installed." "description": "The path where python will be installed."
}, },
"setup_links": { "override_default_version": {
"type": "boolean",
"default": "true",
"description": "If links and aliases should be created."
},
"overrideDefaultVersion": {
"type": "boolean", "type": "boolean",
"default": "true", "default": "true",
"description": "If true, overrides existing version (if any) of python on the PATH" "description": "If true, overrides existing version (if any) of python on the PATH"
......
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/python.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/python.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./python-debian.sh [Python Version] [Python intall path] [PIPX_HOME] [non-root user] [Update rc files flag] [install tools flag] [Use Oryx if available flag] [Optimize when building from source flag] PYTHON_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
INSTALL_PYTHON_TOOLS=${INSTALL_PYTHON_TOOLS:-"true"}
PYTHON_VERSION=${1:-"latest"} # 'system' checks the base image first, else installs 'latest' OPTIMIZE_BUILD_FROM_SOURCE=${OPTIMIZE:-"false"}
PYTHON_INSTALL_PATH=${2:-"/usr/local/python"} PYTHON_INSTALL_PATH=${INSTALL_PATH:-"/usr/local/python"}
export PIPX_HOME=${3:-"/usr/local/py-utils"} OVERRIDE_DEFAULT_VERSION=${OVERRIDE_DEFAULT_VERSION:-"true"}
USERNAME=${4:-"automatic"}
UPDATE_RC=${5:-"true"} export PIPX_HOME=${PIPX_HOME:-"/usr/local/py-utils"}
INSTALL_PYTHON_TOOLS=${6:-"true"}
USE_ORYX_IF_AVAILABLE=${7:-"true"} USERNAME=${USERNAME:-"automatic"}
OPTIMIZE_BUILD_FROM_SOURCE=${8-"false"} UPDATE_RC=${UPDATE_RC:-"true"}
OVERRIDE_DEFAULT_VERSION=${9:-"true"} USE_ORYX_IF_AVAILABLE=${USE_ORYX_IF_AVAILABLE:-"true"}
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"
...@@ -41,7 +41,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -41,7 +41,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
...@@ -365,7 +365,7 @@ if ! type pipx > /dev/null 2>&1; then ...@@ -365,7 +365,7 @@ if ! type pipx > /dev/null 2>&1; then
/tmp/pip-tmp/bin/pipx install --pip-args=--no-cache-dir pipx /tmp/pip-tmp/bin/pipx install --pip-args=--no-cache-dir pipx
pipx_path="/tmp/pip-tmp/bin/" pipx_path="/tmp/pip-tmp/bin/"
fi fi
for util in ${DEFAULT_UTILS[@]}; do for util in "${DEFAULT_UTILS[@]}"; do
if ! type ${util} > /dev/null 2>&1; then if ! type ${util} > /dev/null 2>&1; then
${pipx_path}pipx install --system-site-packages --pip-args '--no-cache-dir --force-reinstall' ${util} ${pipx_path}pipx install --system-site-packages --pip-args '--no-cache-dir --force-reinstall' ${util}
else else
......
...@@ -6,13 +6,12 @@ ...@@ -6,13 +6,12 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/ruby.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/ruby.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./ruby-debian.sh [Ruby version] [non-root user] [Add to rc files flag] [Install tools flag]
RUBY_VERSION=${1:-"latest"} RUBY_VERSION=${VERSION:-"latest"}
USERNAME=${2:-"automatic"}
UPDATE_RC=${3:-"true"} USERNAME=${USERNAME:-"automatic"}
INSTALL_RUBY_TOOLS=${6:-"true"} UPDATE_RC=${UPDATE_RC:-"true"}
INSTALL_RUBY_TOOLS=${INSTALL_RUBY_TOOLS:-"true"}
# Note: ruby-debug-ide will install the right version of debase if missing and # Note: ruby-debug-ide will install the right version of debase if missing and
# installing debase directly fails on Ruby 3.1.0 as of 1/7/2022, so omitting. # installing debase directly fails on Ruby 3.1.0 as of 1/7/2022, so omitting.
...@@ -39,7 +38,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -39,7 +38,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -6,16 +6,15 @@ ...@@ -6,16 +6,15 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/rust.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/rust.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./rust-debian.sh [CARGO_HOME] [RUSTUP_HOME] [non-root user] [add CARGO/RUSTUP_HOME to rc files flag] [whether to update rust] [Rust version] [rustup install profile]
export CARGO_HOME=${1:-"/usr/local/cargo"} RUST_VERSION=${VERSION:-"latest"}
export RUSTUP_HOME=${2:-"/usr/local/rustup"} RUSTUP_PROFILE=${PROFILE:-"minimal"}
USERNAME=${3:-"automatic"}
UPDATE_RC=${4:-"true"} export CARGO_HOME=${CARGO_HOME:-"/usr/local/cargo"}
UPDATE_RUST=${5:-"false"} export RUSTUP_HOME=${RUSTUP_HOME:-"/usr/local/rustup"}
RUST_VERSION=${6:-"latest"} USERNAME=${USERNAME:-"automatic"}
RUSTUP_PROFILE=${7:-"minimal"} UPDATE_RC=${UPDATE_RC:-"true"}
UPDATE_RUST=${UPDATE_RUST:-"false"}
set -e set -e
...@@ -33,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh ...@@ -33,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -7,15 +7,13 @@ ...@@ -7,15 +7,13 @@
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/sshd.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/sshd.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
# #
# Syntax: ./sshd-debian.sh [SSH Port (don't use 22)] [non-root user] [start sshd now flag] [new password for user] [fix environment flag]
#
# Note: You can change your user's password with "sudo passwd $(whoami)" (or just "passwd" if running as root). # Note: You can change your user's password with "sudo passwd $(whoami)" (or just "passwd" if running as root).
SSHD_PORT=${1:-"2222"} SSHD_PORT=${SSHD_PORT:-"2222"}
USERNAME=${2:-"automatic"} USERNAME=${USERNAME:-"automatic"}
START_SSHD=${3:-"false"} START_SSHD=${START_SSHD:-"false"}
NEW_PASSWORD=${4:-"skip"} NEW_PASSWORD=${NEW_PASSWORD:-"skip"}
FIX_ENVIRONMENT=${5:-"true"} FIX_ENVIRONMENT=${FIX_ENVIRONMENT:-"true"}
set -e set -e
...@@ -28,7 +26,7 @@ fi ...@@ -28,7 +26,7 @@ fi
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
USERNAME="" USERNAME=""
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)") POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
if id -u ${CURRENT_USER} > /dev/null 2>&1; then if id -u ${CURRENT_USER} > /dev/null 2>&1; then
USERNAME=${CURRENT_USER} USERNAME=${CURRENT_USER}
break break
......
...@@ -6,17 +6,16 @@ ...@@ -6,17 +6,16 @@
# #
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/terraform.md # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/terraform.md
# Maintainer: The VS Code and Codespaces Teams # Maintainer: The VS Code and Codespaces Teams
#
# Syntax: ./terraform-debian.sh [terraform version] [tflint version] [terragrunt version] [terraform SHA] [tflint SHA] [terragrunt SHA]
set -e set -e
TERRAFORM_VERSION="${1:-"latest"}" TERRAFORM_VERSION="${VERSION:-"latest"}"
TFLINT_VERSION="${2:-"latest"}" TFLINT_VERSION="${TFLINT:-"latest"}"
TERRAGRUNT_VERSION="${3:-"latest"}" TERRAGRUNT_VERSION="${TERRAGRUNT:-"latest"}"
TERRAFORM_SHA256="${4:-"automatic"}"
TFLINT_SHA256="${5:-"automatic"}" TERRAFORM_SHA256="${TERRAFORM_SHA256:-"automatic"}"
TERRAGRUNT_SHA256="${6:-"automatic"}" TFLINT_SHA256="${TFLINT_SHA256:-"automatic"}"
TERRAGRUNT_SHA256="${TERRAGRUNT_SHA256:-"automatic"}"
TERRAFORM_GPG_KEY="72D7468F" TERRAFORM_GPG_KEY="72D7468F"
TFLINT_GPG_KEY_URI="https://raw.githubusercontent.com/terraform-linters/tflint/master/8CE69160EB3F2FE9.key" TFLINT_GPG_KEY_URI="https://raw.githubusercontent.com/terraform-linters/tflint/master/8CE69160EB3F2FE9.key"
......
...@@ -5,11 +5,10 @@ set -e ...@@ -5,11 +5,10 @@ set -e
# Optional: Import test library # Optional: Import test library
source dev-container-features-test-lib source dev-container-features-test-lib
# Definition specific tests check "version 3.9 installed" ls -1 /usr/local/python/ | grep 3.9
check "version" python --version check "version 3.8 installed" ls -1 /usr/local/python/ | grep 3.8
# ... check "3.9 alias to python on path" python --version | grep 3.9
# ...
# Report result # Report result
reportResults reportResults
...@@ -4,11 +4,16 @@ ...@@ -4,11 +4,16 @@
"features": [ "features": [
{ {
"id": "python", "id": "python",
"options": {
"version": "3.8" "version": "3.8"
}
}, },
{ {
"id": "python", "id": "python",
"version": "3.9" "options": {
"version": "3.9",
"overrideDefaultVersion": true
}
} }
] ]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment