2016-05-02 13:31:38 +05:30
|
|
|
FROM codemix/yii2-base:2.0.8-php-fpm
|
|
|
|
|
|
|
|
# Composer packages are installed first. This will only add packages
|
|
|
|
# that are not already in the yii2-base image.
|
|
|
|
COPY composer.json /var/www/html/
|
|
|
|
COPY composer.lock /var/www/html/
|
2016-05-05 13:45:53 +05:30
|
|
|
|
|
|
|
RUN composer self-update --no-progress \
|
|
|
|
&& composer install --no-progress --ignore-platform-reqs
|
2016-05-02 13:31:38 +05:30
|
|
|
|
|
|
|
# Copy the working dir to the image's web root
|
|
|
|
COPY . /var/www/html
|
|
|
|
|
|
|
|
# The following directories are .dockerignored to not pollute the docker images
|
|
|
|
# with local logs and published assets from development. So we need to create
|
|
|
|
# empty dirs and set right permissions inside the container.
|
|
|
|
RUN mkdir api/runtime api/web/assets console/runtime \
|
2016-05-05 13:45:53 +05:30
|
|
|
&& chown www-data:www-data api/runtime api/web/assets console/runtime
|
2016-05-02 13:31:38 +05:30
|
|
|
|
|
|
|
# Expose everything under /var/www (vendor + html)
|
|
|
|
# This is only required for the nginx setup
|
|
|
|
VOLUME ["/var/www"]
|