Skip to content

Commit d1972b4

Browse files
Chuxelsamruddhikhandalejoshspicer
authored
Use _REMOTE_USER when available (#264)
* Use _REMOTE_USER when available * Update src/python/install.sh Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> * Update src/python/install.sh Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> * Fix java test issue - JDK 18 not available for the "open" distro * Bump breakfix numbers Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com> Co-authored-by: Josh Spicer <joshspicer@github.com>
1 parent 4af4c29 commit d1972b4

37 files changed

Lines changed: 125 additions & 126 deletions

src/anaconda/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "anaconda",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"name": "Anaconda",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/anaconda",
66
"options": {

src/anaconda/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
# Maintainer: The VS Code and Codespaces Teams
99

1010

11-
VERSION=${VERSION:-"latest"}
12-
USERNAME=${USERNAME:-"automatic"}
13-
UPDATE_RC=${UPDATE_RC:-"true"}
14-
CONDA_DIR=${CONDA_DIR:-"/usr/local/conda"}
11+
VERSION="${VERSION:-"latest"}"
12+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
13+
UPDATE_RC="${UPDATE_RC:-"true"}"
14+
CONDA_DIR="${CONDA_DIR:-"/usr/local/conda"}"
1515

1616
set -eux
1717
export DEBIAN_FRONTEND=noninteractive

src/common-utils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "common-utils",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"name": "Common Debian Utilities",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
66
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",

src/common-utils/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ set -e
1212
# Clean up
1313
rm -rf /var/lib/apt/lists/*
1414

15-
INSTALL_ZSH=${INSTALLZSH:-"true"}
16-
INSTALL_OH_MY_ZSH=${INSTALLOHMYZSH:-"true"}
17-
UPGRADE_PACKAGES=${UPGRADEPACKAGES:-"true"}
18-
USERNAME=${USERNAME:-"automatic"}
19-
USER_UID=${UID:-"automatic"}
20-
USER_GID=${GID:-"automatic"}
21-
ADD_NON_FREE_PACKAGES=${NONFREEPACKAGES:-"false"}
15+
INSTALL_ZSH="${INSTALLZSH:-"true"}"
16+
INSTALL_OH_MY_ZSH="${INSTALLOHMYZSH:-"true"}"
17+
UPGRADE_PACKAGES="${UPGRADEPACKAGES:-"true"}"
18+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
19+
USER_UID="${UID:-"automatic"}"
20+
USER_GID="${GID:-"automatic"}"
21+
ADD_NON_FREE_PACKAGES="${NONFREEPACKAGES:-"false"}"
2222

2323
MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
2424

src/conda/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "conda",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"name": "Conda",
55
"description": "A cross-platform, language-agnostic binary package manager",
66
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/conda",

src/conda/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
VERSION=${VERSION:-"latest"}
88
ADD_CONDA_FORGE=$ADDCONDAFORGE
99

10-
USERNAME="automatic"
10+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
1111
UPDATE_RC="true"
1212
CONDA_DIR="/opt/conda"
1313

src/desktop-lite/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "desktop-lite",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"name": "Light-weight Desktop",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite",
66
"description": "Adds a lightweight Fluxbox based desktop to the container that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS code terminal will open on the desktop automatically.",

src/desktop-lite/install.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/desktop-lite.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10-
NOVNC_VERSION=${NOVNCVERSION:-"1.2.0"} # TODO: Add in a 'latest' auto-detect and swap name to 'version'
10+
NOVNC_VERSION="${NOVNCVERSION:-"1.2.0"}" # TODO: Add in a 'latest' auto-detect and swap name to 'version'
1111
VNC_PASSWORD=${PASSWORD:-"vscode"}
1212
NOVNC_PORT="${WEBPORT:-6080}"
1313
VNC_PORT="${VNCPORT:-5901}"
1414

15-
INSTALL_NOVNC=${INSTALL_NOVNC:-"true"}
16-
USERNAME=${USERNAME:-"automatic"}
17-
15+
INSTALL_NOVNC="${INSTALL_NOVNC:-"true"}"
16+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
1817

1918
WEBSOCKETIFY_VERSION=0.10.0
2019

src/docker-from-docker/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "docker-from-docker",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"name": "Docker (Docker-from-Docker)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/docker-from-docker",
66
"descripton": "Re-use the host docker socket, adding the Docker CLI to a container. Feature invokes a script to enable using a forwarded Docker socket within a container to run Docker commands.",

src/docker-from-docker/install.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/docker.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10-
DOCKER_VERSION=${VERSION:-"latest"}
11-
USE_MOBY=${MOBY:-"true"}
12-
DOCKER_DASH_COMPOSE_VERSION=${DOCKERDASHCOMPOSEVERSION:-"v1"} # v1 or v2
13-
14-
ENABLE_NONROOT_DOCKER=${ENABLE_NONROOT_DOCKER:-"true"}
15-
SOURCE_SOCKET=${SOURCE_SOCKET:-"/var/run/docker-host.sock"}
16-
TARGET_SOCKET=${TARGET_SOCKET:-"/var/run/docker.sock"}
17-
USERNAME=${USERNAME:-"automatic"}
10+
DOCKER_VERSION="${VERSION:-"latest"}"
11+
USE_MOBY="${MOBY:-"true"}"
12+
DOCKER_DASH_COMPOSE_VERSION="${DOCKERDASHCOMPOSEVERSION:-"v1"}" # v1 or v2
13+
14+
ENABLE_NONROOT_DOCKER="${ENABLE_NONROOT_DOCKER:-"true"}"
15+
SOURCE_SOCKET="${SOURCE_SOCKET:-"/var/run/docker-host.sock"}"
16+
TARGET_SOCKET="${TARGET_SOCKET:-"/var/run/docker.sock"}"
17+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
1818

1919
MICROSOFT_GPG_KEYS_URI="https://packages.microsoft.com/keys/microsoft.asc"
2020
DOCKER_MOBY_ARCHIVE_VERSION_CODENAMES="buster bullseye bionic focal jammy"

0 commit comments

Comments
 (0)