ancient-rose-2730608/22/2022, 3:43 PM
target and for a Docker image it should be
target. Throwing in gRPC and Protobufs in the mixture and there I know that
target type will resolve the proto dependency at the time of executing
goal. Would the target type
do the same? Is
the right goal for my use case here as in to build a Docker image?
refined-addition-5364408/22/2022, 4:20 PM
ancient-rose-2730608/22/2022, 4:43 PM
This might be helpful.
GenerallyOk, what would be the workflow then? Adding the dependency ofis the recommended target for docker image.
target to the
refined-addition-5364408/22/2022, 4:56 PM
. It's from the docs.
When you COPY PEX binaries into your image, the dependency on the pex_binary target will be inferred, so you don't have to add that explicitly to the list of dependencies on your docker_image target.
is that they are platform dependent and when you copy them inside docker, they are first built on the host not inside the docker container. So if your host is macos and you copy a PEX inside Linux docker Image, it won't work.
ancient-rose-2730608/22/2022, 5:23 PM
refined-addition-5364408/22/2022, 5:51 PM
depends on then you will have to host them somewhere and then pass the necessary secrets to docker build so that it gets installed inside the image.
bundles all 1st party and 3rd party dependencies without much from your side.
ancient-rose-2730608/22/2022, 5:53 PM
goal working and see the results. I can think about the target types later once I have a clear picture in mind and I proceed towards implementing the learnings in prod.