forked from 0916dhkim/vscode-devcontainer-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 886 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (30 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:20.04
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Ensure apt is in non-interactive to avoid prompts
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies.
RUN apt-get -y update --no-install-recommends \
&& apt-get -y install --no-install-recommends \
build-essential \
curl \
ca-certificates \
apt-utils \
dialog \
git \
vim \
&& apt-get autoremove -y \
&& apt-get clean -y
# Add Node.js repository.
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
# Install Node.js.
RUN apt-get -y update --no-install-recommends \
&& apt-get -y install --no-install-recommends nodejs \
&& apt-get autoremove -y \
&& apt-get clean -y
# Create the user.
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
ENV DEBIAN_FRONTEND=dialog
USER $USERNAME