Run a docker command within a container managed by tilt

750 Views Asked by At

In my node project, I would like to define a script in my package.json file like:

{
    "scripts": {
        "runTestsWithTilt": "<some command to run tests within a container launched by tilt>"
    }
}

Is there a tilt cli command where I could run an arbitrary command through docker exec?

Something like: tilt docker exec <container-name> <command-to-run>

1

There are 1 best solutions below

2
On

Tilt is still developing and the documentation is very minimal, in the official documentation and in the official github page they have mentioned only a syntax for executing docker commands but they didn’t provide a complete manual anywhere. So for now, similar to KinD (Kubernetes in Docker) we need to use docker commands for a few operations. Hope this will be addressed soon.