-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
32 lines (29 loc) · 1006 Bytes
/
Dockerfile
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
#
# ubuntu-node Dockerfile
# An Ubuntu distribution of Node.js
#
# See https://hub.docker.com/r/rbecheras/ubuntu-node
#
# docker pull rbecheras/ubuntu-node
#
FROM ubuntu:18.04
LABEL Author="Rémi Becheras <[email protected]>"
# Install Node.js, Yarn and required dependencies
RUN apt-get update \
&& apt-get install -y curl gnupg build-essential \
&& curl --silent --location https://deb.nodesource.com/setup_8.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"]