docker run extension
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Describe the Feature You Want
A docker_run extension that makes it easier to run a docker container correctly with 'local_resource'
Why Do You Want This?
We frequently see people use local_resource to run processes on Docker.
Here's an example:
https://github.com/tilt-dev/tilt/issues/4484
Unfortunately, there are mismatches between how local_resource does signal handling and how docker run does signal handling.
In local_resource, Tilt creates a process group. When you stop Tilt (with kill or ctrl-c), Tilt kills the entire process tree. This is basically "container process" semantics.
In docker run, docker leaves it up to the container to determine how to handle external signals and whether to pass signals onto the container.
You can currently work around this by adding your own wrapper script:
function cleanup() {
docker stop mycontainer
}
trap cleanup SIGINT
but it seems like we should be able to do this with existing APIs and package it up under https://github.com/tilt-dev/tilt-extensions
Related issues:
https://github.com/tilt-dev/tilt/issues/4484
https://github.com/tilt-dev/tilt/issues/4456
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading related issues 4484 and 4456, then review the existing APIs and the tilt-extensions package mentioned in the issue. Define the extension's scope around running Docker containers with local_resource and handling shutdown signals correctly; done means the documented wrapper-script workaround is packaged as a usable docker_run extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100