From 766d792006136bcd99757fb6902112823c6e7943 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 22 Nov 2023 09:10:27 +0000 Subject: [PATCH] chore: add docker file --- .devcontainer/Dockerfile | 15 +++++++++++++++ .devcontainer/docker-compose.yml | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..34a19aed --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/devcontainers/javascript-node:1-18-bullseye + +# [Optional] Uncomment this section to install additional OS packages. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends iputils-ping + +RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc +RUN chmod +x /usr/local/bin/mc + +# [Optional] Uncomment if you want to install an additional version of node using nvm +ARG EXTRA_NODE_VERSION=18 +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 " diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 23371d63..6410edcf 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -7,9 +7,9 @@ services: # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile" # array). The sample below assumes your primary file is in the root of your project. # - # build: - # context: . - # dockerfile: .devcontainer/Dockerfile + build: + context: . + dockerfile: ./Dockerfile volumes: # Update this to wherever you want VS Code to mount the folder of your project