Docker-compose Projects not building

Hi,

I have a VisualStudio project that consists of 3 Services within a docker-compose file. I can run the project and the containers spin up. Debugging also works fine!

 

The 3 Services themselfes have Dockerfiles and they should be build within the Docker-containers, with the environment variables from the docker-compose-file/env file.

When I change something in the projects and rebuild, the container is not updated. Instead the build is performed locally and the running Docker-Container does not know that the image has been updated. In VisualStudio, after saving a file and hitting "refreh" it automatically builds the project and updates fine!

When I activate the --force build option it works. But that takes a long time.

So my question is: How does Jet Brains Rider recognize that a Service changed and needs to be rebuilt with docker-compose?

 

1
4 comments

I guess it is not possible with Rider? Very unfortunate :/ I switch back to Visual Studio whenever I work with docker-compose, which currently is like 90%

0

Hello Marcello,

You are right, this is not possible in Rider at the moment. Here is the corresponding feature request: https://youtrack.jetbrains.com/issue/RIDER-43484. Please note that the visibility for this issue is set to "Only registered users", so please create a YouTrack account to watch and upvote it.

0
Avatar
Permanently deleted user

The above link doesn't work.

0

Fast/Regular modes for docker debugging are available in Rider 2022.1.

Fast mode is enabled by default for dockerfile and docker-compose debugging.
You can disable the publish step using Don't use publish in Docker fast debug option in Run configurations.
To use regular mode, you can add <ContainerDevelopmentMode>Regular</ContainerDevelopmentMode> in .csproj or enable Don't use Docker fast debug in Run configurations.

Currently, fast mode has a few limitations:

  • Only available for Linux containers
  • Only available for Dockerfiles with standard structure (with base, build, publish, final steps and entrypoint: dotnet app.dll)

If your solution does not match the requirements, then debug will start in regular mode.
We continue to work on improving this feature. 

0

Please sign in to leave a comment.