forked from gramcha/ubuntu-node-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-node14
57 lines (43 loc) · 1.63 KB
/
Dockerfile-node14
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:20.04 AS BUILD_IMAGE
LABEL maintainer="gramcha <gramcha@outlook.com>"
ENV BOOTSTRAP=bootstrap
ENV TZ=Etc/UTC
# important step to avoid awscli interactive question select timezone during installation
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# update os and download required packages
RUN apt-get -y update && \
apt-get -y dist-upgrade && \
apt-get install -y awscli && \
apt-get install -y gnupg2 && \
apt-get install -y sudo && \
apt-get install -y curl && \
apt-get install -y vim && \
apt-get install -y wget && \
apt-get install -y dialog && \
apt-get install -y net-tools && \
apt-get install -y lsof && \
apt-get install -y unzip && \
apt-get install -y nginx && \
apt-get install -y rpl && \
apt-get install -y uuid-runtime
# setup node.js, yarn
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
RUN apt-get install -f --yes nodejs
RUN apt-get install -f --yes build-essential
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN apt update
RUN apt-get install --yes yarn
# TODO: revisit this seciton for Node 14 version
# install npm build tools
RUN npm install cmake-js prebuild-install prebuild node-addon-api
RUN mkdir /root/ubuntu-node-nginx/
ADD . /root/ubuntu-node-nginx/
WORKDIR /root/ubuntu-node-nginx/
RUN chmod +x entrypoint.sh
EXPOSE 80
EXPOSE 443
STOPSIGNAL SIGQUIT
COPY entrypoint.sh /root/ubuntu-node-nginx/
ENTRYPOINT ["/root/ubuntu-node-nginx/entrypoint.sh"]
CMD ["Hello", ", world!"]