hello! I'm a software engineer at Neuro AI. I'm lo...
# welcome
a
hello! I'm a software engineer at Neuro AI. I'm looking in Pants as an option for moving from multi-repo to mono-repo. one thing I'm particularly interested in is local development; right now we're very Docker-oriented, and try to require the developer to have as little as possible installed directly on their machines. I've already ran into problems with Pants picking up my macOS Python 😅 plus our tests require services to run, which we currently provide via Docker. would be happy to hear how others are approaching this
👋 4
👀 1
h
Have you tried running Pants inside a Docker container on your MacBook, with your local code repo volume-mapped into the container, so that native edits are seen in the container?
We are also looking at having Pants be able to execute subprocesses in a Docker container (today it can execute them locally, or remotely, so this would be a third execution model, somewhat similar to remote execution), but that is future work
a
the second option might be suitable yes. what we have now are scripts like
script/test
and
script/up
which run commands within docker-compose contexts (like
docker compose <config> run app pytest
)
the first option is good too actually! having a wrapper around
./pants
which runs everything within a container which has the source mounted inside it
guess the tricky thing there would be nesting, e.g. if the
./docker-pants
script wants to run the tests, which require launching some docker-compose stuff
h
yeah, docker-in-docker doesn't really work
c
yeah, docker-in-docker doesn’t really work
Well, it does, if you’re able to have your docker daemon listen on a tcp socket, that you can connect to from within a container.