Browse Source

Improvements to the Dockerfile:

1.  WORKDIR added
2.  sets up a csv directory for accounting files
3.  Adds to VOLUME for mysql and configuration files
4.  EXPOSE 80
master
Jonathan Rosenbaum 7 years ago
parent
commit
a00d6d8555
  1. 14
      Dockerfile

14
Dockerfile

@ -8,8 +8,10 @@ FROM bikebike/bikebike:14.04
MAINTAINER Jonathan Rosenbaum <gnuser@gmail.com> MAINTAINER Jonathan Rosenbaum <gnuser@gmail.com>
RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql php5-curl; RUN apt-get update && apt-get -y install apache2-mpm-prefork php5 php5-mysql php5-curl;
RUN cd /var/www/html/; \
rm index.html; \ WORKDIR /var/www/html
RUN rm index.html; \
git clone -b devel https://github.com/fspc/Yellow-Bike-Database.git . git clone -b devel https://github.com/fspc/Yellow-Bike-Database.git .
COPY YBDB.php /var/www/html/Connections/ COPY YBDB.php /var/www/html/Connections/
@ -26,11 +28,17 @@ RUN service mysql start; \
mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \ mysql ybdb < /var/www/html/sql/MySQL_Structure.sql; \
mysql ybdb < /var/www/html/sql/populate.sql; mysql ybdb < /var/www/html/sql/populate.sql;
## Will need to mkdir csv dir, change perms to www-data, and chmod 0700 RUN mkdir csv; \
chown www-data:www-data csv; \
chmod 0700 csv;
COPY mysql.conf /etc/supervisor/conf.d/ COPY mysql.conf /etc/supervisor/conf.d/
COPY apache2.conf /etc/supervisor/conf.d/ COPY apache2.conf /etc/supervisor/conf.d/
VOLUME /var/lib/mysql /var/www/html/Connections
EXPOSE 80
CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"] CMD ["supervisord", "-c", "/etc/supervisor/supervisord.conf"]
# docker run -d -p 81:80 --name="ybdb" bikebike/ybdb # docker run -d -p 81:80 --name="ybdb" bikebike/ybdb

Loading…
Cancel
Save