-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 847 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
FROM ubuntu:focal
ENV TZ=Asia/Dushanbe
RUN apt-get update && apt-get install -y curl && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install nodejs -y && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get install -y --no-install-recommends mysql-server mysql-client netcat
COPY ./init.sql /tmp/init.sql
RUN mkdir /var/run/mysqld && \
chown mysql:mysql /var/run/mysqld && \
mkdir -p /opt/mysql/mysql/data && \
chown -R mysql:mysql /opt/mysql/mysql && \
chmod 750 /opt/mysql/mysql/data && \
mysqld --initialize-insecure --user=mysql --basedir=/opt/mysql/mysql --datadir=/opt/mysql/mysql/data --init_file=/tmp/init.sql
COPY ./*.sh ./app/
RUN chmod +x ./app/*.sh
WORKDIR /app
COPY ./*.js* /app/
RUN npm install
EXPOSE 9999
CMD ["/app/run.sh"]