Skip to content

Commit d65c9f4

Browse files
authored
Update definition to latest in master
1 parent 02ee8d2 commit d65c9f4

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/python-3/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/blob/master/containers/python-3/.devcontainer/base.Dockerfile
22
ARG VARIANT="3"
33
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
44

@@ -12,12 +12,19 @@ RUN if ! cat /etc/group | grep -e "^pip-global:" > /dev/null 2>&1; then groupadd
1212
&& chown :pip-global ${PIP_TARGET} \
1313
&& ( [ ! -f "/etc/profile.d/00-restore-env.sh" ] || sed -i -e "s/export PATH=/export PATH=\/usr\/local\/pip-global:/" /etc/profile.d/00-restore-env.sh )
1414

15+
# [Option] Install Node.js
16+
ARG INSTALL_NODE="true"
17+
ARG NODE_VERSION="lts/*"
18+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
19+
1520
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
1621
# COPY requirements.txt /tmp/pip-tmp/
1722
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
1823
# && rm -rf /tmp/pip-tmp
1924

2025
# [Optional] Uncomment this section to install additional OS packages.
21-
# RUN apt-get update \
22-
# && export DEBIAN_FRONTEND=noninteractive \
26+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
2327
# && apt-get -y install --no-install-recommends <your-package-list-here>
28+
29+
# [Optional] Uncomment this line to install global node packages.
30+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.134.0/containers/python-3
2+
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/python-3
33
{
44
"name": "Python 3",
55
"build": {
66
"dockerfile": "Dockerfile",
77
"context": "..",
8-
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8
9-
"args": { "VARIANT": "3" }
8+
"args": {
9+
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
10+
"VARIANT": "3",
11+
// Options
12+
"INSTALL_NODE": "true",
13+
"NODE_VERSION": "lts/*"
14+
}
1015
},
1116

1217
// Set *default* container specific settings.json values on container create.

0 commit comments

Comments
 (0)