T
T
thisall2021-12-23 22:42:32
Docker
thisall, 2021-12-23 22:42:32

How to properly solve problems when building a docker container?

I have Dockerfile

FROM php:8.0-cli-alpine

RUN php -v
RUN apk update && apk add composer \
  git \
  nano \
  libzip-dev \
  unzip \
  postgresql-dev

# Install PHP Extensions
RUN docker-php-ext-install pdo pdo_pgsql pdo_mysql zip opcache

# Enable PHP Extensions
RUN docker-php-ext-enable opcache

# Update Composer
RUN composer self-update --stable
RUN composer -V

WORKDIR /var/www/

RUN chown -R www-data.www-data /var/www/
COPY --chown=www-data /. /var/www/

# Download RoadRunner
RUN composer install && vendor/bin/spiral get-binary -l /usr/local/bin

ENTRYPOINT /var/www/up.sh

EXPOSE 8080


Before that I had php:7.4-cli-alpine3.14

it But I decided to switch to 8.0 and there are errors during the build

61c4d0bd6eb8b791514167.png

I'm trying to add new necessary extensions, for example `fileinfo` and `mbstring`
RUN docker-php-ext-install pdo pdo_pgsql pdo_mysql zip opcache fileinfo mbstring


But the errors still remain, I clear the cache, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question