-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
63 lines (51 loc) · 1.59 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
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:trusty
MAINTAINER Dell Cloud Market Place <[email protected]>
# Update existing packages.
RUN apt-get update
# Ensure UTF-8
RUN locale-gen en_US.UTF-8 && \
dpkg-reconfigure locales && \
export LC_ALL=en_US.UTF-8 && \
export LANGUAGE=en_US.UTF-8 && \
export LANG=en_US.UTF-8
# Install packages
RUN DEBIAN_FRONTEND=noninteractive \
apt-get -y install \
supervisor \
git \
apache2 \
libapache2-mod-php5 \
mysql-server-5.5 \
php5-mysql \
pwgen \
php-apc \
openssl
RUN apt-get -y clean
# Add image configuration and scripts
COPY start-apache2.sh /start-apache2.sh
COPY start-mysqld.sh /start-mysqld.sh
COPY run.sh /run.sh
RUN chmod 755 /*.sh
COPY my.cnf /etc/mysql/conf.d/my.cnf
COPY supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
COPY supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf
# Remove pre-installed database
RUN rm -rf /var/lib/mysql/*
# Add MySQL utils
COPY create_mysql_admin_user.sh /create_mysql_admin_user.sh
RUN chmod 755 /*.sh
# Config to enable .htaccess
COPY apache_default /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite
# Environment variables to configure PHP
ENV PHP_UPLOAD_MAX_FILESIZE 10M
ENV PHP_POST_MAX_SIZE 10M
# Configure SSL
RUN a2enmod ssl
RUN mkdir /etc/apache2/ssl
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \
/etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt \
-subj '/O=Dell/OU=MarketPlace/CN=www.dell.com'
RUN a2ensite default-ssl
EXPOSE 80 3306 443
CMD ["/run.sh"]