mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
docker: split up application and dependency layers
This commit is contained in:
parent
1d385ad6aa
commit
cc8e458906
@ -2,8 +2,6 @@
|
||||
|
||||
FROM composer AS composer
|
||||
FROM php:8.1-fpm-bullseye
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
COPY . /code
|
||||
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
zlib1g-dev libicu-dev g++ \
|
||||
@ -36,8 +34,12 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
&& pecl install -o -f igbinary \
|
||||
&& docker-php-ext-install gd zip opcache intl pdo pdo_mysql mysqli bcmath gettext iconv mbstring curl \
|
||||
&& docker-php-ext-enable igbinary redis imagick \
|
||||
&& useradd -MU leftypol \
|
||||
&& /code/docker/common-setup.sh \
|
||||
&& useradd -MU leftypol
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
COPY . /code
|
||||
|
||||
RUN /code/docker/common-setup.sh \
|
||||
&& ln -s /code/composer.json /code/composer.lock /var/www-leftypol/ \
|
||||
&& cd /var/www-leftypol && composer install
|
||||
|
||||
@ -45,4 +47,4 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
RUN /code/docker/common-setup.sh
|
||||
WORKDIR "/var/www-leftypol"
|
||||
CMD ["php-fpm"]
|
||||
EXPOSE 9000
|
||||
EXPOSE 9000
|
||||
|
Loading…
Reference in New Issue
Block a user