-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for Job containers #205
Comments
Hey @tomkerkhove, It's possible we can solve your problem with MSBuild targets in the dcproj. Can you share the run command you need to have happen before launch, redacting as needed? |
Hi Brandon, I think the above is a good example, would that work for you? |
@tomkerkhove I was able to make it run a custom command with this target in the .dcproj:
If your needed image name / service name to run is fixed, it's quite easy to add here, otherwise it may need some more refined MSBuild properties in the command. In the above example, |
Thanks, I'll give it a go soon! |
Would be great if we could use "job" containers with Docker Compose before other services start.
These are containers that have the sole role of starting up, do some work and die. An example of them are containers to prepare the database (which is run in another container) and stop.
Here is an example of how Kong uses them.
The issue is that Docker Compose
depends_on
does not wait for the dependant container to start until the depending container has finished.The recommendation is to use the following approach:
example
However, we do not control this with the Docker tools for Visual Studio and would be great to have that support or documentation how to work around it.
Some alternatives also package an external tool to containers to wait but this should not be required given that changes the docker image that is being shipped
The text was updated successfully, but these errors were encountered: