-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (33 loc) · 1.29 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM phusion/baseimage:0.9.22
# Install node 8.x environment
RUN curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
RUN bash nodesource_setup.sh
# Install yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install Ubuntu Packages
RUN apt-get update && apt-get install nodejs git-core yarn vim wget htop -y
# Setup HOME Environment variable
ENV HOME /root
CMD ["/sbin/my_init"]
# Set terminal to non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Create new symlink to UTC timezone for localtime
RUN unlink /etc/localtime
RUN ln -s /usr/share/zoneinfo/UTC /etc/localtime
# Copy friendly bashrc file for docker identification in terminal
COPY .build/.bashrc /root/.bashrc
# Copy startup script script for node services
COPY .build/01_node_services.sh /etc/my_init.d/01_node_services.sh
RUN chmod +x /etc/my_init.d/01_node_services.sh
# Set terminal environment
ENV TERM=xterm
# Setup working dir/create empty public folder
WORKDIR /home/app
RUN mkdir -p /home/app/public
# Bundle app source
COPY . /home/app
# Setup Public folder permissions
RUN chmod -R 755 /home/app/public
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*