Код: Выделить всё
FROM php:8.2-fpm
RUN apt-get update && apt-get install -y \
git \
libzip-dev \
unzip \
libonig-dev \
libxml2-dev wget nano curl \
libicu-dev
RUN apt-get install -y --no-install-recommends apt-utils
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath opcache
RUN docker-php-ext-install ctype iconv session simplexml
RUN apt-get install -y --no-install-recommends \
libicu-dev \
&& docker-php-ext-install -j$(nproc) intl
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN apt-get install -y --no-install-recommends libmagickwand-dev \
&& pecl install imagick \
&& docker-php-ext-enable imagick
RUN wget https://get.symfony.com/cli/installer -O - | bash
RUN mv /root/.symfony5/bin/symfony /usr/local/bin/symfony
COPY ./php/php.ini /usr/local/etc/php/php.ini
RUN apt-get install acl
COPY ./php/.bashrc /root/.bashrc
COPY ./php/id_rsa.pub /root/.ssh/id_rsa.pub
COPY ./php/id_rsa /root/.ssh/id_rsa
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get install -y --no-install-recommends apt-transport-https software-properties-common nodejs
RUN npm install yarn sass grunt -g
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN git config --global user.email "xxx@gmail.com" && \
git config --global user.name "rudak" && \
git config --global --add safe.directory /var/www/html
WORKDIR /var/www/html
# HERE , THE SYMFONY PROJECT WILL BE CREATED
RUN symfony new . --webapp --no-interaction --verbose
# BUT NOTHING IN THE DIRECTORY...
CMD ["php-fpm"]
вы хоть представляете, что происходит? включен?
обратите внимание на новую версию RUN symfony . Команда --webapp --no-interaction --verbose работает нормально, если я подключаюсь к bash моего контейнера (но я бы хотел автоматизировать ее, чтобы упростить развертывание при создании нового проекта).
Подробнее здесь: https://stackoverflow.com/questions/783 ... dockerfile
Мобильная версия