mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
devcontainer: bump node version to 18 (#523)
This commit is contained in:
1 parent
909c5a785f
commit
9cd7c5cfab
4 files changed
+42
-59
No files matched your search
@@ -1,20 +1,9 @@
|
||||
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
|
||||
ARG VARIANT=16-bullseye
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
|
||||
|
||||
# Install MongoDB command line tools if on buster and x86_64 (arm64 not supported)
|
||||
ARG MONGO_TOOLS_VERSION=5.0
|
||||
RUN . /etc/os-release \
|
||||
&& if [ "${VERSION_CODENAME}" = "buster" ] && [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
||||
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 $(lsb_release -cs)/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-database-tools mongodb-mongosh \
|
||||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*; \
|
||||
fi
|
||||
|
||||
RUN npm i pm2 yarn -g && \
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install clang -y --no-install-recommends && \
|
||||
mkdir -p ~/.hydro && \
|
||||
echo '{"host":"127.0.0.1","port":"27017","name":"hydro","username":"","password":""}' >~/.hydro/config.json && \
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:18-bullseye
|
||||
ADD https://github.com/criyle/go-judge/releases/download/v1.6.3/executorserver_1.6.3_linux_amd64 /usr/bin/sandbox
|
||||
RUN npm install -g yarn && \
|
||||
sudo apt-get update && sudo apt-get install gcc g++ && \
|
||||
mkdir -p /root/.hydro /data/file && chmod +x /usr/bin/sandbox && \
|
||||
chown -R root:root /root /root/.hydro /data/file && \
|
||||
echo '{"uri":"mongodb://mongo/hydro"}' > /root/.hydro/config.json && \
|
||||
echo '["@hydrooj/ui-default","@hydrooj/hydrojudge"]' > /root/.hydro/addon.json
|
||||
ENTRYPOINT sandbox
|
||||
Reference in new issue
Block a user