Skip to content
Wrapper scripts for your container process: easily restart with restart.sh
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
restart.sh
start.sh

README.md

Rerunning your process via live_update

i.e., simulating restart_container() on non-Docker clusters

As of 6/28/19: restart_container(), a command that can be passed to a live_update, doesn't work on non-Docker clusters. However there's a workaround available to simulate restart_container()'s functionality. It's used in the onewatch integration test so that the test passes on non-Docker clusters. Here's how to do it yourself:

Copy start.sh and restart.sh to your container working dir.

If your container entrypoint was path-to-binary [arg1] [arg2]..., change it to:

./start.sh path-to-binary [arg1] [arg2]...

To restart the container, instead of including Live Update step restart_container(), use: run('./restart.sh')

So, for example:

docker_build('gcr.io/windmill-test-containers/integration/onewatch',
    '.',
    dockerfile='Dockerfile',
    live_update=[
        sync('.', '/go/src/github.com/windmilleng/tilt/integration/onewatch'),
        run('go install github.com/windmilleng/tilt/integration/onewatch'),
        run('./restart.sh'),
    ])

This live update will cause the go install to be run in the container every time anything in the . path locally changes. After the go install is run, ./restart.sh will be run. This will kill the original entrypoint, and restart it, effectively simulating the container_restart() functionality on Docker.

You can’t perform that action at this time.