skip to Main Content

I have ran into this problem when opening the project in container.

Setting up container for folder or workspace: c:Workplaygroundmoodlelms_administrace
Run: docker-compose -f c:Workplaygroundmoodlelms_administracedockerdocker-compose-dev.yml config --services
app
redis
db
phpmyadmin
Run: docker-compose --project-name docker -f c:Workplaygroundmoodlelms_administracedockerdocker-compose-dev.yml up -d --build
Creating volume "docker_mysql_data_volume" with default driver
Pulling app (nodejs:)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]

The problem is that I cannot press y or N. I know why I’m having this problem – because I have used that docker compose file before and containers and volumes were created with the directory prefix (docker).

There’s a way how to change the compose project name through .env file, but it does not work (I put the file in the root directory, in the directory where compose file is, and in the .devcontainer folder). And also there is -p parameter, but the MS GitHub page does not provide any information.

I can probably fix it by renaming everything, but this may be a serious issue since you can’t continue in the process …

Did anybody experienced similar problem and fixed that?

Thanks,

Karel

2

Answers


  1. I had the same problem,My problem is using the wrong mirror name.

    Login or Signup to reply.
  2. You probably mistyped service docker image name in docker-compose.yml.

    You are trying to pull nodejs image instead of node

    Also, there is could be same error with case postgresql and postgres.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search