Skip to content

Commit

Permalink
Updating FROM of Dockerfile's
Browse files Browse the repository at this point in the history
  • Loading branch information
gullitmiranda committed May 23, 2015
1 parent 6c233e5 commit e73ebdf
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 138 deletions.
74 changes: 34 additions & 40 deletions 5.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,58 +1,52 @@
# The container includes:
# The image includes:
#
# PARENT:
# - Git
# - Apache2
# - PHP Version 5.5.9
# - Composer
# - Vim
# - Node
# - MySQL Client
# - PostgreSQL Client
# - MongoDB
# - Apache2 with root
#
# THIS:
# - PHP Version 5.5
# - Composer

FROM azukiapp/node
FROM azukiapp/apache2
MAINTAINER Azuki <support@azukiapp.com>

# Install PHP5 + Apache2 + Libs
RUN apt-get update -qq \
&& apt-get install -y -qq \
apache2 \
libxml2 \
libcurl4-openssl-dev \
libapache2-mod-php5 \
php5-dev \
php5-cli \
php5-mysql \
php5-pgsql \
php5-mcrypt \
php5-curl \
php5-json \
php5-gd \
php-pear \
php-apc \
# Enable php and apache modules
RUN phpDeps='libxml2 \
libcurl4-openssl-dev \
libapache2-mod-php5 \
php5-dev \
php5-cli \
php5-mysql \
php5-pgsql \
php5-mcrypt \
php5-curl \
php5-json \
php5-gd \
php-pear \
php-apc' \
&& apt-get update -qq \
&& apt-get install -y -qq $phpDeps \
&& pecl install mongo \
&& apt-get clean -qq \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Enable php and apache modules
RUN echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini
RUN a2enmod rewrite && \
php5enmod mcrypt mongo

RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini
RUN sed -i 's/\/var\/www\/html/\/var\/www\/public/g' /etc/apache2/sites-available/000-default.conf

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Add image configuration and scripts
ADD run.sh /run.sh
RUN chmod 755 /*.sh
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& apt-get purge -y --auto-remove $buildDeps \
&& echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini \
&& a2enmod rewrite \
&& php5enmod mcrypt mongo \
&& sed -i -e "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \

# Configure /app folder with sample app
RUN mkdir -p /app && rm -fr /var/www && ln -s /app /var/www
ADD sample/ /app
# Configure nginx root with sample app
ADD sample/ /var/www/public

EXPOSE 80
WORKDIR /app

CMD ["/run.sh"]
CMD ["apache2-foreground"]
19 changes: 0 additions & 19 deletions 5.5/run.sh

This file was deleted.

78 changes: 36 additions & 42 deletions 5.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,63 +1,57 @@
# The container includes:
# The image includes:
#
# PARENT:
# - Git
# - Apache2
# - PHP Version 5.6
# - Composer
# - Vim
# - Node
# - MySQL Client
# - PostgreSQL Client
# - MongoDB
# - Apache2 with root
#
# THIS:
# - PHP Version 5.6
# - Composer

FROM azukiapp/node
FROM azukiapp/apache2
MAINTAINER Azuki <support@azukiapp.com>

# Add PHP repository to apt source
RUN echo "deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main" \
> /etc/apt/sources.list.d/php5-5.6.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-key E5267A6C
RUN echo "deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main" \
> /etc/apt/sources.list.d/php5-5.6.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-key E5267A6C

# Install PHP5 + Apache2 + Libs
RUN apt-get update -qq \
&& apt-get install -y -qq \
apache2 \
libxml2 \
libcurl4-openssl-dev \
libapache2-mod-php5 \
php5-dev \
php5-cli \
php5-mysql \
php5-pgsql \
php5-mcrypt \
php5-curl \
php5-json \
php5-gd \
php-pear \
php-apc \
# Enable php and apache modules
RUN phpDeps='libxml2 \
libcurl4-openssl-dev \
libapache2-mod-php5 \
php5-dev \
php5-cli \
php5-mysql \
php5-pgsql \
php5-mcrypt \
php5-curl \
php5-json \
php5-gd \
php-pear \
php-apc' \
&& apt-get update -qq \
&& apt-get install -y -qq $phpDeps \
&& pecl install mongo \
&& apt-get clean -qq \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*


# Enable php and apache modules
RUN echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini
RUN a2enmod rewrite && \
php5enmod mcrypt mongo

RUN sed -i -e "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini \
&& sed -i -e "s/\/var\/www\/html/\/var\/www\/public/g" /etc/apache2/sites-available/000-default.conf

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Add image configuration and scripts
ADD run.sh /run.sh
RUN chmod 755 /*.sh
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& apt-get purge -y --auto-remove $buildDeps \
&& echo "extension=mongo.so" > /etc/php5/mods-available/mongo.ini \
&& a2enmod rewrite \
&& php5enmod mcrypt mongo \
&& sed -i -e "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \

# Configure nginx root with sample app
ADD sample/ /var/www/public
RUN chown -R :www-data /var/www/public

EXPOSE 80
WORKDIR /app

CMD ["/run.sh"]
CMD ["apache2-foreground"]
19 changes: 0 additions & 19 deletions 5.6/run.sh

This file was deleted.

28 changes: 10 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ Versions (tags)
Image content:
---

##### PARENT:
- Ubuntu 14.04
- Git
- VIM
- Composer
- NodeJS
- npm
- PHP

Database:

- PostgreSQL client
- MySQL client
- Vim
- Node
- MySQL Client
- PostgreSQL Client
- MongoDB
- SQLite3
- Apache2 with root

###### THIS:
- PHP Version 5.6/5.5
- Composer

### Usage with `azk`

Expand Down Expand Up @@ -68,13 +67,6 @@ systems({
envs: {
// set instances variables
APP_DIR: "/azk/#{manifest.dir}",
PHP_ENV: "dev",
},
docker_extra: {
// extra docker options
start: {
Privileged: "true",
},
},
},
});
Expand Down

0 comments on commit e73ebdf

Please sign in to comment.