Docker

Docker

Joe

FROM ubuntu:16.04

LABEL maintainer="Joe Lomakin"

ENV PHP_VERSION=7.0

# PHP_FPM_USER=www-data

RUN apt-get update

# Install Base pkg.

RUN apt-get install software-properties-common libreadline6 \

libreadline6-dev git build-essential mc wget curl vim-nox unzip -y

# Install Nginx.

RUN apt-get install nginx -y

# Install PHP.

RUN apt-get install \

php${PHP_VERSION}-fpm \

php${PHP_VERSION}-mysql \

php${PHP_VERSION}-cli \

php${PHP_VERSION}-mbstring \

php${PHP_VERSION}-gd \

-y

RUN mkdir -p /run/

RUN mkdir -p /run/php/

RUN apt-get clean

RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN echo "daemon off;" >> /etc/nginx/nginx.conf

# copy www

COPY fs/var/www/html/index.html /var/www/html/index.html

COPY fs/var/www/html/index.php /var/www/html/index.php

# copy config

COPY fs/etc/nginx/sites-available/default /etc/nginx/sites-available/default

COPY fs/etc/php/7.0/fpm/php.ini /etc/php/7.0/fpm/php.ini

RUN touch /run/php/php7.0-fpm.sock

# Define working directory.

WORKDIR /etc/nginx


# Define default command.

CMD ["/usr/sbin/php-fpm7.0", "-F"]

CMD ["nginx"]

#CMD ["php7.0-fpm"]

# Expose ports.

EXPOSE 80


Report Page