I want to use docker an when i run docker-compose build i get the title error. My question is what causes this problem?
This is the docker-compose.yml:
version: '3.8'
services:
nginx:
image: nginx:1.19.0-alpine
restart: on-failure
volumes:
- './apps/my-symfony-app/public:/usr/src/app'
- './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro'
ports:
- '80:80'
depends_on:
- php
php:
build:
context: .
dockerfile: .docker/php/Dockerfile
volumes:
- './apps/my-symfony-app/:/usr/src/app'
restart: on-failure
env_file:
- .env
user: 1000:1000
I have added this Dockerfile. Maybe it has to do with this file i am not sure.
FROM composer:2.0 as composer
FROM php:7.4-fpm
RUN docker-php-ext-install pdo_mysql
RUN pecl install apcu
RUN apt-get update && \
apt-get install -y \
libzip-dev
RUN docker-php-ext-install zip
RUN docker-php-ext-enable apcu
WORKDIR /usr/src/app
COPY --chown=1000:1000 apps/my-symfony-app /usr/src/app
RUN PATH=$PATH:/usr/src/app/vendor/bin:bin
RUN composer install --no-scripts --prefer-dist \
&& rm -rf "$(composer config cache-dir)" "$(composer config data-dir)"