-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (20 loc) · 794 Bytes
/
Dockerfile
File metadata and controls
23 lines (20 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:18.04
LABEL Name=docker-ubuntu-node Version=1.0.0
RUN apt-get update \
&& apt-get install -y curl gnupg build-essential \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get remove -y --purge cmdtest \
&& apt-get update \
&& apt-get install -y nodejs yarn \
# remove useless files from the current layer
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists.d/* \
&& apt-get autoremove \
&& apt-get clean \
&& apt-get autoclean
RUN adduser --disabled-password --gecos "" --uid 1000 node
USER 1000
WORKDIR /home/node
CMD ["node"]