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
This commit is contained in:
parent
283b8e1f8f
commit
c12a205ab8
60 changed files with 442 additions and 311 deletions
18
.github/workflows/linter-automated.yaml
vendored
Normal file
18
.github/workflows/linter-automated.yaml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
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]
|
24
.github/workflows/linter-manual.yaml
vendored
Normal file
24
.github/workflows/linter-manual.yaml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
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 }}
|
10
.github/workflows/test-pr.yaml
vendored
10
.github/workflows/test-pr.yaml
vendored
|
@ -41,10 +41,18 @@ jobs:
|
|||
test:
|
||||
needs: detect-changes
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
- name: " Testing '${{ matrix.features }}' against '${{ matrix.baseImage }}'"
|
||||
|
|
15
.github/workflows/test-scenarios.yaml
vendored
Normal file
15
.github/workflows/test-scenarios.yaml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
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`
|
Binary file not shown.
|
@ -4,7 +4,7 @@ detect_user() {
|
|||
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
|
||||
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
|
||||
declare -g ${user_variable_name}="${current_user}"
|
||||
break
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/anaconda.md
|
||||
# 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"}
|
||||
|
||||
set -eux
|
||||
|
@ -32,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/awscli.md
|
||||
# Maintainer: The VS Code and Codespaces Teams
|
||||
#
|
||||
# Syntax: ./awscli-debian.sh [AWS CLI version]
|
||||
|
||||
set -e
|
||||
|
||||
AWSCLI_VERSION=${1:-"latest"}
|
||||
VERSION=${VERSION:-"latest"}
|
||||
|
||||
AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C
|
||||
AWSCLI_GPG_KEY_MATERIAL="-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
|
@ -108,8 +107,8 @@ install() {
|
|||
local scriptSigFile=awscli.sig
|
||||
|
||||
# See Linux install docs at https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
|
||||
if [ "${AWSCLI_VERSION}" != "latest" ]; then
|
||||
local versionStr=-${AWSCLI_VERSION}
|
||||
if [ "${VERSION}" != "latest" ]; then
|
||||
local versionStr=-${VERSION}
|
||||
fi
|
||||
architecture=$(dpkg --print-architecture)
|
||||
case "${architecture}" in
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/azcli.md
|
||||
# Maintainer: The VS Code and Codespaces Teams
|
||||
#
|
||||
# Syntax: ./azcli-debian.sh
|
||||
|
||||
set -e
|
||||
|
||||
AZ_VERSION=${1:-"latest"}
|
||||
AZ_VERSION=${VERSION:-"latest"}
|
||||
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
AZCLI_ARCHIVE_ARCHITECTURES="amd64"
|
||||
AZCLI_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
|
||||
|
|
|
@ -3,42 +3,53 @@
|
|||
"name": "common",
|
||||
"description": "common",
|
||||
"options": {
|
||||
"installZsh": {
|
||||
"install_Zsh": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Install ZSH?"
|
||||
},
|
||||
"installOhMyZsh": {
|
||||
"install_Oh_My_Zsh": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Install Oh My Zsh!?"
|
||||
},
|
||||
"upgradePackages": {
|
||||
"upgrade_packages": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Upgrade OS packages?"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"proposals": ["vscode", "codespace", "none", "automatic"],
|
||||
"proposals": [
|
||||
"vscode",
|
||||
"codespace",
|
||||
"none",
|
||||
"automatic"
|
||||
],
|
||||
"default": "automatic",
|
||||
"description": "Enter name of non-root user to configure or none to skip"
|
||||
},
|
||||
"uid": {
|
||||
"user_uid": {
|
||||
"type": "string",
|
||||
"proposals": ["1000", "automatic"],
|
||||
"proposals": [
|
||||
"1000",
|
||||
"automatic"
|
||||
],
|
||||
"default": "automatic",
|
||||
"description": "Enter uid for non-root user"
|
||||
},
|
||||
"gid": {
|
||||
"user_gid": {
|
||||
"type": "string",
|
||||
"proposals": ["1000", "automatic"],
|
||||
"proposals": [
|
||||
"1000",
|
||||
"automatic"
|
||||
],
|
||||
"default": "automatic",
|
||||
"description": "Enter gid for non-root user"
|
||||
},
|
||||
"nonFreePackages": {
|
||||
"add_non_free_packages": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"description": "Add packages from non-free Debian repository?"
|
||||
}
|
||||
},
|
|
@ -6,18 +6,17 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md
|
||||
# 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
|
||||
|
||||
INSTALL_ZSH=${1:-"true"}
|
||||
USERNAME=${2:-"automatic"}
|
||||
USER_UID=${3:-"automatic"}
|
||||
USER_GID=${4:-"automatic"}
|
||||
UPGRADE_PACKAGES=${5:-"true"}
|
||||
INSTALL_OH_MYS=${6:-"true"}
|
||||
ADD_NON_FREE_PACKAGES=${7:-"false"}
|
||||
INSTALL_ZSH=${INSTALL_ZSH:-"true"}
|
||||
INSTALL_OH_MY_ZSH=${INSTALL_OH_MY_ZSH:-"true"}
|
||||
UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-"true"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
USER_UID=${USER_UID:-"automatic"}
|
||||
USER_GID=${USER_GID:-"automatic"}
|
||||
ADD_NON_FREE_PACKAGES=${ADD_NON_FREE_PACKAGES:-"false"}
|
||||
|
||||
SCRIPT_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)"
|
||||
MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
|
||||
|
||||
|
@ -35,7 +34,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
@ -85,6 +84,7 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
|
|||
net-tools \
|
||||
psmisc \
|
||||
curl \
|
||||
tree \
|
||||
wget \
|
||||
rsync \
|
||||
ca-certificates \
|
||||
|
@ -376,7 +376,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
|
|||
# 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.
|
||||
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"
|
||||
user_rc_file="${user_rc_path}/.zshrc"
|
||||
umask g-w,o-w
|
||||
|
|
|
@ -4,25 +4,43 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"enum": ["latest"],
|
||||
"proposals": [
|
||||
"latest"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Currently unused."
|
||||
"description": "Currently Unused!"
|
||||
},
|
||||
"password": {
|
||||
"novnc_version": {
|
||||
"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",
|
||||
"description": "Enter a password for desktop connections"
|
||||
},
|
||||
"webPort": {
|
||||
"novnc_port": {
|
||||
"type": "string",
|
||||
"proposals": ["6080"],
|
||||
"proposals": [
|
||||
"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",
|
||||
"proposals": ["5901"],
|
||||
"proposals": [
|
||||
"5901"
|
||||
],
|
||||
"default": "5901",
|
||||
"description": "Enter a port for the desktop VNC server"
|
||||
}
|
|
@ -6,16 +6,16 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/desktop-lite.md
|
||||
# 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"}
|
||||
VNC_PASSWORD=${2:-"vscode"}
|
||||
INSTALL_NOVNC=${3:-"true"}
|
||||
VNC_PORT="${4:-5901}"
|
||||
NOVNC_PORT="${5:-6080}"
|
||||
NOVNC_VERSION=${NOVNC_VERSION:-"1.2.0"} # TODO: Add in a 'latest' auto-detect and swap name to 'version'
|
||||
VNC_PASSWORD=${VNC_PASSWORD:-"vscode"}
|
||||
NOVNC_PORT="${NOVNC_PORT:-6080}"
|
||||
VNC_PORT="${VNC_PORT:-5901}"
|
||||
|
||||
INSTALL_NOVNC=${INSTALL_NOVNC:-"true"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
|
||||
|
||||
NOVNC_VERSION=1.2.0
|
||||
WEBSOCKETIFY_VERSION=0.10.0
|
||||
|
||||
package_list="
|
||||
|
@ -72,7 +72,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "none", "20.10"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"none",
|
||||
"20.10"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a Docker/Moby CLI version. (Availability can vary by OS version.)"
|
||||
},
|
||||
|
@ -13,9 +17,12 @@
|
|||
"default": true,
|
||||
"description": "Install OSS Moby build instead of Docker CE"
|
||||
},
|
||||
"dockerDashComposeVersion": {
|
||||
"docker_dash_compose_version": {
|
||||
"type": "string",
|
||||
"enum": ["v1", "v2" ],
|
||||
"enum": [
|
||||
"v1",
|
||||
"v2"
|
||||
],
|
||||
"default": "v1",
|
||||
"description": "Compose version to use for docker-compose (v1 or v2)"
|
||||
}
|
|
@ -6,16 +6,16 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md
|
||||
# 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]
|
||||
|
||||
ENABLE_NONROOT_DOCKER=${1:-"true"}
|
||||
SOURCE_SOCKET=${2:-"/var/run/docker-host.sock"}
|
||||
TARGET_SOCKET=${3:-"/var/run/docker.sock"}
|
||||
USERNAME=${4:-"automatic"}
|
||||
USE_MOBY=${5:-"true"}
|
||||
DOCKER_VERSION=${6:-"latest"}
|
||||
DOCKER_DASH_COMPOSE_VERSION=${7:-"v1"} # v1 or v2
|
||||
DOCKER_VERSION=${VERSION:-"latest"}
|
||||
USE_MOBY=${MOBY:-"true"}
|
||||
DOCKER_DASH_COMPOSE_VERSION=${DOCKER_DASH_COMPOSE_VERSION:-"v1"} # v1 or v2
|
||||
|
||||
ENABLE_NONROOT_DOCKER=${ENABLE_NONROOT_DOCKER:-"true"}
|
||||
SOURCE_SOCKET=${SOURCE_SOCKET:-"/var/run/docker-host.sock"}
|
||||
TARGET_SOCKET=${TARGET_SOCKET:-"/var/run/docker.sock"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
|
||||
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"
|
||||
|
@ -31,7 +31,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "none", "20.10" ],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"none",
|
||||
"20.10"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a Docker/Moby Engine version. (Availability can vary by OS version.)"
|
||||
},
|
||||
|
@ -13,9 +17,12 @@
|
|||
"default": true,
|
||||
"description": "Install OSS Moby build instead of Docker CE"
|
||||
},
|
||||
"dockerDashComposeVersion": {
|
||||
"docker_dash_compose_version": {
|
||||
"type": "string",
|
||||
"enum": ["v1", "v2" ],
|
||||
"enum": [
|
||||
"v1",
|
||||
"v2"
|
||||
],
|
||||
"default": "v1",
|
||||
"description": "Default version of Docker Compose (v1 or v2)"
|
||||
}
|
|
@ -6,14 +6,15 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker-in-docker.md
|
||||
# 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"}
|
||||
USE_MOBY=${3:-"true"}
|
||||
DOCKER_VERSION=${4:-"latest"} # The Docker/Moby Engine + CLI should match in version
|
||||
DOCKER_DASH_COMPOSE_VERSION=${5:-"v1"} # v1 or v2
|
||||
|
||||
DOCKER_VERSION=${VERSION:-"latest"} # The Docker/Moby Engine + CLI should match in version
|
||||
USE_MOBY=${MOBY:-"true"}
|
||||
DOCKER_DASH_COMPOSE_VERSION=${DOCKER_DASH_COMPOSE_VERSION:-"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"
|
||||
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"
|
||||
DOCKER_LICENSED_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal hirsute impish jammy"
|
||||
|
@ -40,7 +41,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,21 +4,26 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest","6.0","5.0","3.1"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"6.0",
|
||||
"5.0",
|
||||
"3.1"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a dotnet CLI version. (Available versions may vary by Linux distribution.)"
|
||||
},
|
||||
"runtimeOnly": {
|
||||
"runtime_only": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Install just the dotnet runtime if true, and sdk if false."
|
||||
},
|
||||
"overrideDefaultVersion": {
|
||||
"override_default_version": {
|
||||
"type": "boolean",
|
||||
"default": "true",
|
||||
"description": "If true, overrides existing version (if any) of dotnet on the PATH"
|
||||
},
|
||||
"installUsingApt": {
|
||||
"install_using_apt": {
|
||||
"type": "boolean",
|
||||
"default": "true",
|
||||
"description": "If true, it installs using apt instead of the release URL"
|
|
@ -6,17 +6,16 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/dotnet.md
|
||||
# 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=${1:-"latest"}
|
||||
DOTNET_RUNTIME_ONLY=${2:-"false"}
|
||||
USERNAME=${3:-"automatic"}
|
||||
UPDATE_RC=${4:-"true"}
|
||||
TARGET_DOTNET_ROOT=${5:-"/usr/local/dotnet"}
|
||||
ACCESS_GROUP=${6:-"dotnet"}
|
||||
OVERRIDE_DEFAULT_VERSION=${7:-"true"}
|
||||
INSTALL_USING_APT=${8:-"true"}
|
||||
DOTNET_VERSION=${VERSION:-"latest"}
|
||||
DOTNET_RUNTIME_ONLY=${RUNTIME_ONLY:-"false"}
|
||||
OVERRIDE_DEFAULT_VERSION=${OVERRIDE_DEFAULT_VERSION:-"true"}
|
||||
INSTALL_USING_APT=${INSTALL_USING_APT:-"true"}
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
TARGET_DOTNET_ROOT=${TARGET_DOTNET_ROOT:-"/usr/local/dotnet"}
|
||||
ACCESS_GROUP=${ACCESS_GROUP:-"dotnet"}
|
||||
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
DOTNET_ARCHIVE_ARCHITECTURES="amd64"
|
||||
|
|
|
@ -4,9 +4,12 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"enum": ["latest", "none"],
|
||||
"enum": [
|
||||
"latest",
|
||||
"none"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Currently unused."
|
||||
"description": "Select version of Git LFS to install"
|
||||
}
|
||||
},
|
||||
"install": {
|
|
@ -6,10 +6,9 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-lfs.md
|
||||
# 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_ARCHITECTURES="amd64"
|
||||
GIT_LFS_ARCHIVE_VERSION_CODENAMES="stretch buster bullseye bionic focal"
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-from-src.md
|
||||
# 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'
|
||||
USE_PPA_IF_AVAILABLE=${2:-"false"}
|
||||
GIT_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
|
||||
USE_PPA_IF_AVAILABLE=${PPA:-"false"}
|
||||
|
||||
GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "none"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"none"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select version of the GitHub CLI, if not latest."
|
||||
}
|
|
@ -6,10 +6,8 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/github.md
|
||||
# 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
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
||||
|
|
|
@ -6,15 +6,14 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/go.md
|
||||
# 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_GOROOT=${2:-"/usr/local/go"}
|
||||
TARGET_GOPATH=${3:-"/go"}
|
||||
USERNAME=${4:-"automatic"}
|
||||
UPDATE_RC=${5:-"true"}
|
||||
INSTALL_GO_TOOLS=${6:-"true"}
|
||||
TARGET_GO_VERSION=${VERSION:-"latest"}
|
||||
|
||||
TARGET_GOROOT=${TARGET_GOROOT:-"/usr/local/go"}
|
||||
TARGET_GOPATH=${TARGET_GOPATH:-"/go"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
INSTALL_GO_TOOLS=${INSTALL_GO_TOOLS:-"true"}
|
||||
|
||||
# https://www.google.com/linuxrepositories/
|
||||
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
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md
|
||||
# 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"}
|
||||
USERNAME=${3:-"automatic"}
|
||||
UPDATE_RC=${4:-"true"}
|
||||
VERSION=${VERSION:-"latest"}
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
|
||||
HUGO_DIR=${HUGO_DIR:-"/usr/local/hugo"}
|
||||
|
||||
|
@ -31,7 +30,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
#
|
||||
# Syntax: ./java-debian.sh [JDK version] [SDKMAN_DIR] [non-root user] [Add to rc files flag]
|
||||
|
||||
JAVA_VERSION=${1:-"lts"}
|
||||
export SDKMAN_DIR=${2:-"/usr/local/sdkman"}
|
||||
USERNAME=${3:-"automatic"}
|
||||
UPDATE_RC=${4:-"true"}
|
||||
JAVA_VERSION=${VERSION:-"lts"}
|
||||
|
||||
export SDKMAN_DIR=${SDKMAN_DIR:-"/usr/local/sdkman"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -30,7 +31,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -27,7 +27,7 @@ if [ "${is_jdk_8}" = "true" ]; then
|
|||
# Determine the appropriate non-root user
|
||||
username=""
|
||||
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
|
||||
username=${current_user}
|
||||
break
|
||||
|
|
|
@ -4,13 +4,19 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "3.6.2"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"3.6.2"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a jupyterlab version."
|
||||
},
|
||||
"pythonBinary": {
|
||||
"python_binary": {
|
||||
"type": "string",
|
||||
"proposals": ["python", "/usr/local/python/bin/python"],
|
||||
"proposals": [
|
||||
"python",
|
||||
"/usr/local/python/bin/python"
|
||||
],
|
||||
"default": "python",
|
||||
"description": "Select or enter the python binary path."
|
||||
}
|
|
@ -6,15 +6,14 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/jupyterlab.md
|
||||
# Maintainer: The VS Code and Codespaces Teams
|
||||
#
|
||||
# Syntax: ./jupyter-debian.sh
|
||||
|
||||
set -ex
|
||||
|
||||
VERSION=${1:-"latest"}
|
||||
USERNAME=${2:-"automatic"}
|
||||
PYTHON=${3:-"python"}
|
||||
ALLOW_ALL_ORIGINS=${4:-""}
|
||||
VERSION=${VERSION:-"latest"}
|
||||
PYTHON=${PYTHON_BINARY:-"python"}
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
ALLOW_ALL_ORIGINS=${ALLOW_ALL_ORIGINS:-""}
|
||||
|
||||
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.'
|
||||
|
@ -25,7 +24,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,19 +4,29 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "none", "1.23", "1.22", "1.21"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"none",
|
||||
"1.23",
|
||||
"1.22",
|
||||
"1.21"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a Kubernetes version to install"
|
||||
},
|
||||
"helm": {
|
||||
"type": "string",
|
||||
"proposals": ["latest"],
|
||||
"proposals": [
|
||||
"latest"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a Helm version to install"
|
||||
},
|
||||
"minikube": {
|
||||
"type": "string",
|
||||
"proposals": ["latest"],
|
||||
"proposals": [
|
||||
"latest"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a Minikube version to install"
|
||||
}
|
|
@ -6,18 +6,17 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/kubectl-helm.md
|
||||
# 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
|
||||
|
||||
KUBECTL_VERSION="${1:-"latest"}"
|
||||
HELM_VERSION="${2:-"latest"}"
|
||||
MINIKUBE_VERSION="${3:-"none"}" # latest is also valid
|
||||
KUBECTL_SHA256="${4:-"automatic"}"
|
||||
HELM_SHA256="${5:-"automatic"}"
|
||||
MINIKUBE_SHA256="${6:-"automatic"}"
|
||||
USERNAME=${7:-"automatic"}
|
||||
KUBECTL_VERSION="${VERSION:-"latest"}"
|
||||
HELM_VERSION="${HELM:-"latest"}"
|
||||
MINIKUBE_VERSION="${MINIKUBE:-"none"}" # latest is also valid
|
||||
|
||||
KUBECTL_SHA256="${KUBECTL_SHA256:-"automatic"}"
|
||||
HELM_SHA256="${HELM_SHA256:-"automatic"}"
|
||||
MINIKUBE_SHA256="${MINIKUBE_SHA256:-"automatic"}"
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
|
||||
HELM_GPG_KEYS_URI="https://raw.githubusercontent.com/helm/helm/main/KEYS"
|
||||
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80
|
||||
|
@ -33,7 +32,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,22 +4,31 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": [ "lts", "latest", "none", "18", "16", "14" ],
|
||||
"proposals": [
|
||||
"lts",
|
||||
"latest",
|
||||
"none",
|
||||
"18",
|
||||
"16",
|
||||
"14"
|
||||
],
|
||||
"default": "lts",
|
||||
"description": "Select or enter a Node.js version to install"
|
||||
},
|
||||
"nodeGypDependencies": {
|
||||
"install_tools_for_node_gyp": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Install dependencies to compile native node modules (node-gyp)?"
|
||||
},
|
||||
"nvmInstallPath": {
|
||||
"nvm_install_path": {
|
||||
"type": "string",
|
||||
"default": "/usr/local/share/nvm",
|
||||
"description": "The path where NVM will be installed."
|
||||
}
|
||||
},
|
||||
"extensions": ["dbaeumer.vscode-eslint"],
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint"
|
||||
],
|
||||
"containerEnv": {
|
||||
"NVM_DIR": "/usr/local/share/nvm",
|
||||
"NVM_SYMLINK_CURRENT": "true",
|
|
@ -6,14 +6,14 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/node.md
|
||||
# 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=${2:-"lts"}
|
||||
USERNAME=${3:-"automatic"}
|
||||
UPDATE_RC=${4:-"true"}
|
||||
INSTALL_TOOLS_FOR_NODE_GYP="${5:-true}"
|
||||
export NODE_VERSION=${VERSION:-"lts"}
|
||||
export NVM_DIR=${NVM_INSTALL_PATH:-"/usr/local/share/nvm"}
|
||||
INSTALL_TOOLS_FOR_NODE_GYP="${INSTALL_TOOLS_FOR_NODE_GYP:-true}"
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
|
||||
export NVM_VERSION="0.38.0"
|
||||
|
||||
set -e
|
||||
|
@ -32,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
14
src/oryx/devcontainer-feature.json
Normal file
14
src/oryx/devcontainer-feature.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"id": "oryx",
|
||||
"name": "Oryx",
|
||||
"containerEnv": {
|
||||
"PATH": "usr/local/oryx:${PATH}",
|
||||
"ORYX_SDK_STORAGE_BASE_URL": "https://oryx-cdn.microsoft.io",
|
||||
"ENABLE_DYNAMIC_INSTALL": "true",
|
||||
"DYNAMIC_INSTALL_ROOT_DIR": "/usr/local"
|
||||
},
|
||||
"install": {
|
||||
"app": "",
|
||||
"file": "install.sh"
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"id": "oryx",
|
||||
"name": "Oryx",
|
||||
"containerEnv": {
|
||||
"PATH":"usr/local/oryx:${PATH}",
|
||||
"ORYX_SDK_STORAGE_BASE_URL":"https://oryx-cdn.microsoft.io",
|
||||
"ENABLE_DYNAMIC_INSTALL":"true",
|
||||
"DYNAMIC_INSTALL_ROOT_DIR":"/usr/local"
|
||||
},
|
||||
"install": {
|
||||
"app": "",
|
||||
"file": "install.sh"
|
||||
}
|
||||
}
|
|
@ -6,11 +6,9 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/hugo.md
|
||||
# Maintainer: The VS Code and Codespaces Teams
|
||||
#
|
||||
# Syntax: ./oryx-debian.sh [Non-root user]
|
||||
|
||||
USERNAME=${1:-"automatic"}
|
||||
UPDATE_RC=${2:-"true"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
|
||||
set -eu
|
||||
|
||||
|
@ -28,7 +26,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,16 +4,19 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "8.0.16"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"8.0.16"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a PHP version"
|
||||
},
|
||||
"installComposer": {
|
||||
"install_composer": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Install PHP Composer?"
|
||||
},
|
||||
"overrideDefaultVersion": {
|
||||
"override_default_version": {
|
||||
"type": "boolean",
|
||||
"default": "true",
|
||||
"description": "If true, overrides existing version (if any) of dotnet on the PATH"
|
|
@ -5,17 +5,17 @@
|
|||
#-------------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
|
@ -33,7 +33,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
"options": {
|
||||
"version": {
|
||||
"type": "string",
|
||||
"proposals": ["latest", "none", "7.1"],
|
||||
"proposals": [
|
||||
"latest",
|
||||
"none",
|
||||
"7.1"
|
||||
],
|
||||
"default": "latest",
|
||||
"description": "Select or enter a version of PowerShell."
|
||||
}
|
|
@ -6,12 +6,11 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/powershell.md
|
||||
# Maintainer: The VS Code and Codespaces Teams
|
||||
#
|
||||
# Syntax: ./powershell-debian.sh [version]
|
||||
|
||||
set -e
|
||||
|
||||
POWERSHELL_VERSION=${1:-"latest"}
|
||||
POWERSHELL_VERSION=${VERSION:-"latest"}
|
||||
|
||||
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
|
||||
POWERSHELL_ARCHIVE_ARCHITECTURES="amd64"
|
||||
POWERSHELL_ARCHIVE_VERSION_CODENAMES="stretch buster bionic focal"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"default": "os-provided",
|
||||
"description": "Select a Python version to install."
|
||||
},
|
||||
"installTools": {
|
||||
"install_python_tools": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Install common Python tools like pylint"
|
||||
|
@ -33,12 +33,7 @@
|
|||
"default": "/usr/local/python",
|
||||
"description": "The path where python will be installed."
|
||||
},
|
||||
"setup_links": {
|
||||
"type": "boolean",
|
||||
"default": "true",
|
||||
"description": "If links and aliases should be created."
|
||||
},
|
||||
"overrideDefaultVersion": {
|
||||
"override_default_version": {
|
||||
"type": "boolean",
|
||||
"default": "true",
|
||||
"description": "If true, overrides existing version (if any) of python on the PATH"
|
|
@ -6,18 +6,18 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/python.md
|
||||
# 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=${1:-"latest"} # 'system' checks the base image first, else installs 'latest'
|
||||
PYTHON_INSTALL_PATH=${2:-"/usr/local/python"}
|
||||
export PIPX_HOME=${3:-"/usr/local/py-utils"}
|
||||
USERNAME=${4:-"automatic"}
|
||||
UPDATE_RC=${5:-"true"}
|
||||
INSTALL_PYTHON_TOOLS=${6:-"true"}
|
||||
USE_ORYX_IF_AVAILABLE=${7:-"true"}
|
||||
OPTIMIZE_BUILD_FROM_SOURCE=${8-"false"}
|
||||
OVERRIDE_DEFAULT_VERSION=${9:-"true"}
|
||||
PYTHON_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
|
||||
INSTALL_PYTHON_TOOLS=${INSTALL_PYTHON_TOOLS:-"true"}
|
||||
OPTIMIZE_BUILD_FROM_SOURCE=${OPTIMIZE:-"false"}
|
||||
PYTHON_INSTALL_PATH=${INSTALL_PATH:-"/usr/local/python"}
|
||||
OVERRIDE_DEFAULT_VERSION=${OVERRIDE_DEFAULT_VERSION:-"true"}
|
||||
|
||||
export PIPX_HOME=${PIPX_HOME:-"/usr/local/py-utils"}
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
USE_ORYX_IF_AVAILABLE=${USE_ORYX_IF_AVAILABLE:-"true"}
|
||||
|
||||
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"
|
||||
|
@ -41,7 +41,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
@ -365,7 +365,7 @@ if ! type pipx > /dev/null 2>&1; then
|
|||
/tmp/pip-tmp/bin/pipx install --pip-args=--no-cache-dir pipx
|
||||
pipx_path="/tmp/pip-tmp/bin/"
|
||||
fi
|
||||
for util in ${DEFAULT_UTILS[@]}; do
|
||||
for util in "${DEFAULT_UTILS[@]}"; do
|
||||
if ! type ${util} > /dev/null 2>&1; then
|
||||
${pipx_path}pipx install --system-site-packages --pip-args '--no-cache-dir --force-reinstall' ${util}
|
||||
else
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/ruby.md
|
||||
# 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"}
|
||||
USERNAME=${2:-"automatic"}
|
||||
UPDATE_RC=${3:-"true"}
|
||||
INSTALL_RUBY_TOOLS=${6:-"true"}
|
||||
RUBY_VERSION=${VERSION:-"latest"}
|
||||
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
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
|
||||
# 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
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -6,16 +6,15 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/rust.md
|
||||
# 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"}
|
||||
export RUSTUP_HOME=${2:-"/usr/local/rustup"}
|
||||
USERNAME=${3:-"automatic"}
|
||||
UPDATE_RC=${4:-"true"}
|
||||
UPDATE_RUST=${5:-"false"}
|
||||
RUST_VERSION=${6:-"latest"}
|
||||
RUSTUP_PROFILE=${7:-"minimal"}
|
||||
RUST_VERSION=${VERSION:-"latest"}
|
||||
RUSTUP_PROFILE=${PROFILE:-"minimal"}
|
||||
|
||||
export CARGO_HOME=${CARGO_HOME:-"/usr/local/cargo"}
|
||||
export RUSTUP_HOME=${RUSTUP_HOME:-"/usr/local/rustup"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
UPDATE_RC=${UPDATE_RC:-"true"}
|
||||
UPDATE_RUST=${UPDATE_RUST:-"false"}
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -33,7 +32,7 @@ chmod +x /etc/profile.d/00-restore-env.sh
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -7,15 +7,13 @@
|
|||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/sshd.md
|
||||
# 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).
|
||||
|
||||
SSHD_PORT=${1:-"2222"}
|
||||
USERNAME=${2:-"automatic"}
|
||||
START_SSHD=${3:-"false"}
|
||||
NEW_PASSWORD=${4:-"skip"}
|
||||
FIX_ENVIRONMENT=${5:-"true"}
|
||||
SSHD_PORT=${SSHD_PORT:-"2222"}
|
||||
USERNAME=${USERNAME:-"automatic"}
|
||||
START_SSHD=${START_SSHD:-"false"}
|
||||
NEW_PASSWORD=${NEW_PASSWORD:-"skip"}
|
||||
FIX_ENVIRONMENT=${FIX_ENVIRONMENT:-"true"}
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -28,7 +26,7 @@ fi
|
|||
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
|
||||
USERNAME=""
|
||||
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
|
||||
USERNAME=${CURRENT_USER}
|
||||
break
|
||||
|
|
|
@ -6,17 +6,16 @@
|
|||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/terraform.md
|
||||
# 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
|
||||
|
||||
TERRAFORM_VERSION="${1:-"latest"}"
|
||||
TFLINT_VERSION="${2:-"latest"}"
|
||||
TERRAGRUNT_VERSION="${3:-"latest"}"
|
||||
TERRAFORM_SHA256="${4:-"automatic"}"
|
||||
TFLINT_SHA256="${5:-"automatic"}"
|
||||
TERRAGRUNT_SHA256="${6:-"automatic"}"
|
||||
TERRAFORM_VERSION="${VERSION:-"latest"}"
|
||||
TFLINT_VERSION="${TFLINT:-"latest"}"
|
||||
TERRAGRUNT_VERSION="${TERRAGRUNT:-"latest"}"
|
||||
|
||||
TERRAFORM_SHA256="${TERRAFORM_SHA256:-"automatic"}"
|
||||
TFLINT_SHA256="${TFLINT_SHA256:-"automatic"}"
|
||||
TERRAGRUNT_SHA256="${TERRAGRUNT_SHA256:-"automatic"}"
|
||||
|
||||
TERRAFORM_GPG_KEY="72D7468F"
|
||||
TFLINT_GPG_KEY_URI="https://raw.githubusercontent.com/terraform-linters/tflint/master/8CE69160EB3F2FE9.key"
|
||||
|
|
|
@ -5,11 +5,10 @@ set -e
|
|||
# Optional: Import test library
|
||||
source dev-container-features-test-lib
|
||||
|
||||
# Definition specific tests
|
||||
check "version" python --version
|
||||
check "version 3.9 installed" ls -1 /usr/local/python/ | grep 3.9
|
||||
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
|
||||
reportResults
|
||||
|
|
|
@ -4,11 +4,16 @@
|
|||
"features": [
|
||||
{
|
||||
"id": "python",
|
||||
"options": {
|
||||
"version": "3.8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "python",
|
||||
"version": "3.9"
|
||||
"options": {
|
||||
"version": "3.9",
|
||||
"overrideDefaultVersion": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue