https://pantsbuild.org/ logo
f

freezing-photographer-88553

02/14/2022, 12:09 PM
Hi again, Question regarding deploying source code into docker. Do we need to have pants in the docker image in order to build and run the service ? If yes, is there any standard of how to do it ? If no, how do we build the projects and its dependencies in the image ?
1
c

curved-television-6568

02/14/2022, 12:38 PM
No, you can define a
docker_image
in your BUILD file, and Pants will package your dependencies and include them in the Docker build context so you can
COPY
them with a Dockerfile instruction. See https://github.com/pantsbuild/example-docker for some basic examples.
N.b. that if you’re on a Mac, that you need to consider that the image is on a different platform.
More about the Docker integration in the documentation here: https://www.pantsbuild.org/docs/docker
f

freezing-photographer-88553

02/14/2022, 1:01 PM
This is great. that should solve it
🙏 2
3 Views