Skip to content

Commit f4cf55a

Browse files
committed
Add dotnet and node installations to Dockerfile
1 parent ae15d5e commit f4cf55a

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
77
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
88
&& rm -rf /tmp/conda-tmp
99

10-
# [Optional] Uncomment this section to install additional OS packages.
11-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12-
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
# Setup for dotnet installation
11+
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
12+
RUN dpkg -i packages-microsoft-prod.deb
13+
RUN rm packages-microsoft-prod.deb
14+
15+
# Install dotnet
16+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
17+
&& apt-get -y install --no-install-recommends dotnet-sdk-8.0
18+
19+
# Setup for node installation
20+
RUN apt-get update
21+
RUN apt-get install -y ca-certificates curl gnupg
22+
RUN mkdir -p /etc/apt/keyrings
23+
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
24+
25+
# Set node version (change as needed)
26+
ENV NODE_MAJOR 20
27+
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
28+
29+
# Install node
30+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
31+
&& apt-get -y install --no-install-recommends nodejs

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
// "features": {},
1515

1616
// Use 'forwardPorts' to make a list of ports inside the container available locally.
17-
"forwardPorts": [5432, 3000, 5000]
17+
"forwardPorts": [5432, 3000, 5000, 8000, 8080],
1818

1919
// Use 'postCreateCommand' to run commands after the container is created.
20-
// "postCreateCommand": "python --version",
20+
"postCreateCommand": "nvm install --lts"
2121

2222
// Configure tool-specific properties.
2323
// "customizations": {},

0 commit comments

Comments
 (0)