Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image size improvements #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
FROM ubuntu:latest
MAINTAINER John Fink <[email protected]>
RUN apt-get update # Fri Oct 24 13:09:23 EDT 2014
RUN apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-ldap
RUN easy_install supervisor
LABEL maintainer="John Fink <[email protected]>"

# Fri Oct 24 13:09:23 EDT 2014
RUN apt-get update && \
apt-get -y upgrade && \
DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-client mysql-server apache2 && \
libapache2-mod-php5 pwgen python-setuptools vim-tiny php5-mysql php5-ldap && \
easy_install supervisor

ADD ./scripts/start.sh /start.sh
ADD ./scripts/foreground.sh /etc/apache2/foreground.sh
ADD ./configs/supervisord.conf /etc/supervisord.conf
ADD ./configs/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN rm -rf /var/www/
ADD https://wordpress.org/latest.tar.gz /wordpress.tar.gz
RUN tar xvzf /wordpress.tar.gz
RUN mv /wordpress /var/www/
RUN chown -R www-data:www-data /var/www/
RUN chmod 755 /start.sh
RUN chmod 755 /etc/apache2/foreground.sh
RUN mkdir /var/log/supervisor/

RUN rm -rf /var/www/ && \
tar xvzf /wordpress.tar.gz && \
mv /wordpress /var/www/ && \
chown -R www-data:www-data /var/www/ && \
chmod 755 /start.sh && \
chmod 755 /etc/apache2/foreground.sh && \
mkdir /var/log/supervisor/

EXPOSE 80
CMD ["/bin/bash", "/start.sh"]