-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(devcontainer): pin to bullseye debian version
- Loading branch information
Showing
3 changed files
with
16 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
# Update the VARIANT arg in docker-compose.yml to pick a Node version: 10, 12, 14 | ||
ARG VARIANT=12 | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT} | ||
FROM mcr.microsoft.com/devcontainers/javascript-node:20-bullseye | ||
|
||
# Install MongoDB command line tools | ||
ARG MONGO_TOOLS_VERSION=4.2 | ||
RUN curl -sSL "https://www.mongodb.org/static/pgp/server-${MONGO_TOOLS_VERSION}.asc" | (OUT=$(apt-key add - 2>&1) || echo $OUT) \ | ||
&& echo "deb http://repo.mongodb.org/apt/debian $(lsb_release -cs)/mongodb-org/${MONGO_TOOLS_VERSION} main" | tee /etc/apt/sources.list.d/mongodb-org-${MONGO_TOOLS_VERSION}.list \ | ||
ARG MONGO_TOOLS_VERSION=6.0 | ||
RUN . /etc/os-release \ | ||
&& curl -sSL "https://www.mongodb.org/static/pgp/server-${MONGO_TOOLS_VERSION}.asc" | gpg --dearmor > /usr/share/keyrings/mongodb-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] http://repo.mongodb.org/apt/debian ${VERSION_CODENAME}/mongodb-org/${MONGO_TOOLS_VERSION} main" | tee /etc/apt/sources.list.d/mongodb-org-${MONGO_TOOLS_VERSION}.list \ | ||
&& apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get install -y mongodb-org-tools mongodb-org-shell \ | ||
&& apt-get install -y mongodb-mongosh \ | ||
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get install -y mongodb-database-tools; fi \ | ||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
# Update args in docker-compose.yaml to set the UID/GID of the "node" user. | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \ | ||
groupmod --gid $USER_GID node \ | ||
&& usermod --uid $USER_UID --gid $USER_GID node \ | ||
&& chown -R $USER_UID:$USER_GID /home/node \ | ||
&& chown -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters