https://pantsbuild.org/ logo
#general
Title
# general
i

important-restaurant-12848

01/11/2023, 5:33 PM
Hi, I tried Pants for our use case of CKAN development. CKAN’s only supported on Ubuntu, so we need to run it in Docker. For development, we run Docker compose and mount our source code in the image and enable server reload on source code changes. I’d like to use a tool like Pants to handle the Docker Compose context (i.e. pull in code from outside docker-compose.yml directory). It doesn’t seem like a current use case for Pants. Any suggestions?
b

busy-vase-39202

01/11/2023, 5:40 PM
The Docker support was added by @curved-television-6568, who might have some thoughts.
🙏 1
c

curved-television-6568

01/11/2023, 5:43 PM
it would be nice to have proper support for
docker-compose
in Pants. There are a couple of related issues to this: https://github.com/pantsbuild/pants/issues/16362 https://github.com/pantsbuild/pants/issues/15925
🙏 1
b

busy-vase-39202

01/11/2023, 6:04 PM
@important-restaurant-12848 if you're interested in getting involved in either of those, fyi: we are very open as a project to new contributors and typically there is someone on the team willing to pair with a newcomer on their first issue. 🙂
a

aloof-appointment-30987

01/12/2023, 3:30 PM
I may be misunderstanding the ask but have you considered using a
files
target to reference the source code? It sounds like you may be mounting a volume in your Docker container so that changes on your host machine are reflected in your container? In that case, the above suggestion is not useful. I used this approach to gather all the source files needed to compile our Go app inside a Docker image because the
go_binary
target compiles only for the host platform and was incompatible with our container targets. The approach I've taken to use Docker compose is to build the images using Pants
docker_image
and then execute Docker compose independently of Pants.
3 Views