Merge pull request #37 from cssgunc/backend-dockerfile-update

Add node to dockerfile
This commit is contained in:
Prajwal Moharana 2024-04-25 15:33:01 -04:00 committed by GitHub
commit 38091128bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,19 @@ RUN add-apt-repository ppa:deadsnakes/ppa \
&& unlink /usr/bin/python3 \
&& ln -s /usr/bin/python3.11 /usr/bin/python3
# Install Node.js 18 from https://github.com/nodesource
ENV NODE_MAJOR 18
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& 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 \
&& apt-get update \
&& apt-get install nodejs -y \
&& npm install -g npm@latest \
&& rm -rf /var/lib/apt/lists/*
# Install Angular CLI Globally
RUN npm install -g @angular/cli
# Use a non-root user per https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user
ARG USERNAME=vscode
ARG USER_UID=1000