symfony-docker icon indicating copy to clipboard operation
symfony-docker copied to clipboard

Missing files: composer.* symfony.* Line 98

Open nordin74 opened this issue 2 years ago • 9 comments

During the building process the files composer.* symfony.* are missing.

nordin74 avatar Aug 06 '22 05:08 nordin74

This shouldn't be an issue because we use a pattern (and because our CI is green).

Please check that you aren't running an outdated version of Docker or Docker Compose.

dunglas avatar Aug 06 '22 09:08 dunglas

Same Issue:

Step 27/38 : COPY composer.* symfony.* ./

running docker-compose version 1.25.0, build unknown

If there are a minimum Docker Compose version requirement for the project to work, I think it should be specified in the README file. I've installed without issues symfony-docker about two months ago, using same version of Docker Compose

necobm avatar Aug 06 '22 17:08 necobm

Can you try with Docker Compose v2 please? We upgraded the setup this week.

dunglas avatar Aug 06 '22 18:08 dunglas

It worked with Docker Compose version v2.6.0, but I suggest to alert about this change in README file or by some another way, because this issue will be arise to another users that are using docker compose v1.x

necobm avatar Aug 06 '22 18:08 necobm

Indeed. I wonder if we cannot find a way to conditionally add these files that is compatible with both versions of Compose.

dunglas avatar Aug 07 '22 08:08 dunglas

We need to know during the building process the version at least of docker-engine. I was able to find these predefined variables only: https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope, but they don't work for our case. Maybe the best option is to stick to version 2 of docker-compose and add an environment variable to change the logic of building in case of use of version 1

nordin74 avatar Aug 07 '22 18:08 nordin74

Or maybe, don't support docker compose v1 aymore, existing projects won't break unless they update Dockerfile or dockercompose.yaml file. In the changelog of this project maybe will be a good idea warn of this change and in the section "Getting Started" of README also indicate that. Although the fact that the command docker compose build --pull --no-cache is not "docker-compose" but "docker compose" without the joining character "-" is telling us that it's version 2 allready.

necobm avatar Aug 08 '22 09:08 necobm

Tried with Docker Compose version v2.3.3 and didn't work. Upgraded to v2.11.2 and it worked

filisko avatar Sep 30 '22 15:09 filisko

Simple work-around if you don't want to upgrade Docker Compose (eg when you're stuck on the packager maintained version of V2): create the two files to find during build, delete them afterwards when the actual files are created. So first touch composer.tmp symfony.tmp Then run the server, let it install, and rm composer.tmp symfony.tmp

TacoV avatar Oct 01 '22 07:10 TacoV

We have added a note to recommend the 2.10+ version

maxhelias avatar Oct 17 '22 13:10 maxhelias