-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: use ubuntu:xenial with php7.0 (#3616)
Nice, thanks! I'll patch this over to develop as well.
- Loading branch information
Showing
2 changed files
with
26 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
FROM debian:jessie-slim | ||
FROM ubuntu:xenial | ||
MAINTAINER Brady Wetherington <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
apache2 \ | ||
apache2-bin \ | ||
libapache2-mod-php5 \ | ||
php5-curl \ | ||
php5-ldap \ | ||
php5-mysql \ | ||
php5-mcrypt \ | ||
php5-gd \ | ||
libapache2-mod-php7.0 \ | ||
php7.0-curl \ | ||
php7.0-ldap \ | ||
php7.0-mysql \ | ||
php7.0-mcrypt \ | ||
php7.0-gd \ | ||
php7.0-xml \ | ||
php7.0-mbstring \ | ||
php7.0-zip \ | ||
patch \ | ||
curl \ | ||
vim \ | ||
|
@@ -17,13 +21,13 @@ mysql-client \ | |
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN php5enmod mcrypt | ||
RUN php5enmod gd | ||
RUN phpenmod mcrypt | ||
RUN phpenmod gd | ||
|
||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/apache2/php.ini | ||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php5/cli/php.ini | ||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.0/apache2/php.ini | ||
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.0/cli/php.ini | ||
|
||
RUN useradd --uid 1000 --gid 50 docker | ||
RUN useradd -m --uid 1000 --gid 50 docker | ||
|
||
RUN echo export APACHE_RUN_USER=docker >> /etc/apache2/envvars | ||
RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars | ||
|
@@ -66,7 +70,9 @@ RUN \ | |
RUN cd /tmp;curl -sS https://getcomposer.org/installer | php;mv /tmp/composer.phar /usr/local/bin/composer | ||
|
||
# Get dependencies | ||
RUN cd /var/www/html;composer install | ||
USER docker | ||
RUN cd /var/www/html;composer install && rm -rf /home/docker/.composer/cache | ||
USER root | ||
|
||
############### APPLICATION INSTALL/INIT ################# | ||
|
||
|
@@ -86,7 +92,13 @@ VOLUME ["/var/lib/snipeit"] | |
COPY docker/entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
# Add Tini | ||
ENV TINI_VERSION v0.14.0 | ||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini | ||
RUN chmod +x /tini | ||
ENTRYPOINT ["/tini", "--"] | ||
|
||
CMD ["/entrypoint.sh"] | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/sh | ||
cd /var/www/html | ||
|
||
# fix key if needed | ||
if [ -z "$APP_KEY" ] | ||
|