forked from perchlabs/webird
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
50 lines (39 loc) · 1.28 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
48
49
50
############################################################
# Dockerfile to build Webird container images
############################################################
FROM ubuntu:14.04.3
MAINTAINER David Schissler
ADD . /opt/webird
RUN \
export DEBIAN_FRONTEND=noninteractive && \
export WEBIRD_DB_ROOT_PW='rootpw' && \
/opt/webird/setup/provision-system.sh ubuntu1404
RUN \
ln -s /opt/webird/dev/webird.php /usr/local/bin/webird-dev && \
ln -s /opt/webird/dist/webird.php /usr/local/bin/webird && \
useradd -G www-data -s /bin/bash --home /opt/webird webird && \
chown -R webird.www-data /opt/webird
USER webird
RUN \
export HOME=/opt/webird && \
/opt/webird/setup/install-local-packages.sh
USER root
RUN \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y daemontools && \
mkdir -p /etc/dockerservices/nginx && \
mkdir -p /etc/dockerservices/mysql && \
echo '#!/bin/bash\nexec /usr/sbin/nginx' > /etc/dockerservices/nginx/run && \
echo '#!/bin/bash\nexec /usr/sbin/mysqld' > /etc/dockerservices/mysql/run && \
chmod -R +x /etc/dockerservices
# Webserver ports
EXPOSE 80:8080
EXPOSE 443
# Dev Webpack
EXPOSE 8091
# Dev Websocket
EXPOSE 8092
# Dist Websocket
EXPOSE 8192
# ENTRYPOINT ["/usr/bin/svscan", "/etc/dockerservices/"]