1

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>

coler-j
  • 1,791
  • 1
  • 27
  • 57

1 Answers1

-1

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.

  • The question is how to do the docker command to connect to a pod in the cluster and run arbitrary command – coler-j Jan 11 '23 at 16:11
  • @coler-j if you want to write a code then you can use this [TiltFile api](https://docs.tilt.dev/api.html#api.docker_build) reference documentation here they are mentioning about various arguments out of which you can use the container_args("https://docs.tilt.dev/api.html#api.docker_build:~:text=flag.-,container_args,-(") for connecting to your container. – Kranthiveer Dontineni Jan 11 '23 at 19:38