Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:20
FROM mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm

# Install MySQL client, Redis CLI, mongosh, and MongoDB database tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
# Install MongoDB command line tools - though mongo-database-tools not available on arm64
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-mongosh \
ca-certificates \
curl \
default-mysql-client \
Expand All @@ -11,19 +16,16 @@ RUN apt-get update && \
lsb-release \
procps \
redis-tools \
wget && \
wget https://downloads.mongodb.com/compass/mongosh-2.1.1-linux-x64.tgz && \
tar -zxvf mongosh-2.1.1-linux-x64.tgz && \
cp -R mongosh-2.1.1-linux-x64/bin/* /usr/local/bin/ && \
rm -rf mongosh-2.1.1-linux-x64.tgz mongosh-2.1.1-linux-x64 && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /etc/apt/keyrings/mongodb.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/mongodb.gpg] http://repo.mongodb.org/apt/debian $(lsb_release -cs)/mongodb-org/7.0 main" | \
tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
apt-get update && \
apt-get install -y --no-install-recommends mongodb-database-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
wget \
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get install -y mongodb-database-tools; fi \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"

ENV SHELL=/bin/bash
WORKDIR /workspace
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@

"forwardPorts": [3000, 5000, 27017, 6379, 3306],
"remoteUser": "node"
}
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ networks:
volumes:
mongo-data:
redis-data:
mysql-data:
mysql-data:
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"author": "",
"license": "MIT",
"devDependencies": {
"concurrently": "^8.0.1"
"concurrently": "^8.0.1",
"patch-package": "^8.0.1"
}
}