-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile
29 lines (25 loc) · 1.02 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
FROM node:latest
MAINTAINER zsx <[email protected]>
ENV APP /usr/src/app
## ----------------------------
## MariaDB Start
## ----------------------------
## Add MariaDB PPK
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db && \
echo 'deb http://mirrors.syringanetworks.net/mariadb/repo/10.1/ubuntu trusty main' >> /etc/apt/sources.list && \
echo 'deb-src http://mirrors.syringanetworks.net/mariadb/repo/10.1/ubuntu trusty main' >> /etc/apt/sources.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server pwgen && \
rm -rf /var/lib/mysql/* && \
sed -i -r 's/bind-address.*$/bind-address = 0.0.0.0/' /etc/mysql/my.cnf && \
apt-get install -y memcached && \
mkdir -p ${APP}
WORKDIR ${APP}/
ADD ./ ./
ADD ./docker/ /docker
RUN chmod +x /docker/*.sh && \
npm install && \
npm cache clean && apt-get clean && rm -rf /var/lib/apt/lists/*
VOLUME ["/etc/mysql", "/var/lib/mysql"]
EXPOSE 3306 11211 3000
CMD ["/docker/run.sh"]