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

#16 alpine php 5.6 #19

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
46 changes: 19 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
FROM ubuntu-debootstrap:14.04
FROM php:5.6-alpine
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 5.6 instead of a more recent version?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is first draft. See #21.

MAINTAINER Christian Lück <[email protected]>

RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
nginx supervisor php5-fpm php5-cli \
php5-pgsql php5-mysql php5-sqlite php5-mssql \
wget
ENV ADMINER_VERSION 4.2.4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this TBH. What do you think about #6 and #5?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno. changed in 0fb8d51 anyway.

in fact ADD directive will always download fresh version on build command (doesn't use cached one), so maybe indeed it would be good idea to get latest...


# add adminer as the only nginx site
ADD adminer.nginx.conf /etc/nginx/sites-available/adminer
RUN ln -s /etc/nginx/sites-available/adminer /etc/nginx/sites-enabled/adminer
RUN rm /etc/nginx/sites-enabled/default
# Install nginx, php, and dependencies
RUN apk --update add postgresql-dev sqlite-dev freetds freetds-dev wget \
&& docker-php-ext-configure pdo_pgsql -with-pgsql=/usr/include/postgresql/ \
&& docker-php-ext-configure pdo_sqlite \
&& docker-php-ext-configure mssql \
&& docker-php-ext-install pdo pdo_sqlite pdo_mysql pdo_pgsql mssql \
&& rm -rf /var/cache/apk/*

# install adminer and default theme
RUN mkdir /var/www
RUN wget http://www.adminer.org/latest.php -O /var/www/index.php
RUN wget https://raw.github.com/vrana/adminer/master/designs/hever/adminer.css -O /var/www/adminer.css
WORKDIR /var/www
RUN chown www-data:www-data -R /var/www
# Add the files
ADD php.ini /usr/local/etc/php/conf.d/php.ini
ADD freetds.conf /etc/freetds.conf

# tune PHP settings for uploading large dumps
RUN echo "upload_max_filesize = 2000M" >> /etc/php5/upload_large_dumps.ini \
&& echo "post_max_size = 2000M" >> /etc/php5/upload_large_dumps.ini \
&& echo "memory_limit = -1" >> /etc/php5/upload_large_dumps.ini \
&& echo "max_execution_time = 0" >> /etc/php5/upload_large_dumps.ini \
&& ln -s ../../upload_large_dumps.ini /etc/php5/fpm/conf.d \
&& ln -s ../../upload_large_dumps.ini /etc/php5/cli/conf.d
# install adminer and default theme
RUN mkdir -p /var/www \
&& wget https://www.adminer.org/static/download/$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -O /var/www/index.php \
&& wget --no-check-certificate https://raw.github.com/vrana/adminer/master/designs/hever/adminer.css -O /var/www/adminer.css \
&& chown www-data:www-data -R /var/www

# expose only nginx HTTP port
# Expose the ports for nginx
EXPOSE 80

ADD freetds.conf /etc/freetds/freetds.conf

ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf
CMD php -S 0.0.0.0:80 -t /var/www/
24 changes: 0 additions & 24 deletions adminer.nginx.conf

This file was deleted.

6 changes: 3 additions & 3 deletions freetds.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
# Command and connection timeouts
; timeout = 10
; connect timeout = 10

# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512

# A typical Sybase server
Expand Down
4 changes: 4 additions & 0 deletions php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
upload_max_filesize = 2000M
post_max_size = 2000M
memory_limit = -1
max_execution_time = 0
11 changes: 0 additions & 11 deletions supervisord.conf

This file was deleted.