Just type "docker-compose up" to install a Flex project (major refactoring)
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -15,7 +15,6 @@ RUN set -xe \
|
||||
zlib-dev \
|
||||
&& docker-php-ext-install \
|
||||
intl \
|
||||
pdo_mysql \
|
||||
zip \
|
||||
&& pecl install \
|
||||
apcu-${APCU_VERSION} \
|
||||
@@ -23,16 +22,17 @@ RUN set -xe \
|
||||
&& docker-php-ext-enable --ini-name 05-opcache.ini opcache \
|
||||
&& apk del .build-deps
|
||||
|
||||
###> recipes ###
|
||||
###< recipes ###
|
||||
|
||||
COPY docker/app/php.ini /usr/local/etc/php/php.ini
|
||||
|
||||
COPY docker/app/install-composer.sh /usr/local/bin/docker-app-install-composer
|
||||
RUN chmod +x /usr/local/bin/docker-app-install-composer
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache --virtual .fetch-deps openssl \
|
||||
&& docker-app-install-composer \
|
||||
&& mv composer.phar /usr/local/bin/composer \
|
||||
&& apk del .fetch-deps
|
||||
&& mv composer.phar /usr/local/bin/composer
|
||||
|
||||
# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
|
||||
ENV COMPOSER_ALLOW_SUPERUSER 1
|
||||
@@ -42,24 +42,20 @@ RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress
|
||||
|
||||
WORKDIR /srv/app
|
||||
|
||||
COPY composer.* ./
|
||||
COPY . .
|
||||
# Cleanup unneeded files
|
||||
RUN rm -Rf docker/
|
||||
|
||||
RUN mkdir -p \
|
||||
var/cache \
|
||||
var/logs \
|
||||
var/sessions \
|
||||
&& composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest \
|
||||
# Download the Symfony skeleton
|
||||
ENV SKELETON_COMPOSER_JSON https://raw.githubusercontent.com/symfony/skeleton/v3.3.2/composer.json
|
||||
RUN [ -f composer.json ] || php -r "copy('$SKELETON_COMPOSER_JSON', 'composer.json');"
|
||||
|
||||
RUN mkdir -p var/cache var/logs var/sessions \
|
||||
&& composer install --prefer-dist --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction \
|
||||
&& composer clear-cache \
|
||||
# Permissions hack because setfacl does not work on Mac and Windows
|
||||
&& chown -R www-data var
|
||||
|
||||
COPY etc etc/
|
||||
COPY src src/
|
||||
COPY var var/
|
||||
COPY web web/
|
||||
|
||||
RUN composer dump-autoload --optimize --classmap-authoritative --no-dev
|
||||
|
||||
COPY docker/app/docker-entrypoint.sh /usr/local/bin/docker-app-entrypoint
|
||||
RUN chmod +x /usr/local/bin/docker-app-entrypoint
|
||||
|
||||
|
||||
Reference in New Issue
Block a user