Xilinx / inference-server

https://xilinx.github.io/inference-server/
Apache License 2.0
43 stars 13 forks source link

Allow passing git credentials to Docker build #194

Closed varunsh-xilinx closed 1 year ago

varunsh-xilinx commented 1 year ago

Summary of Changes

Motivation

If there are private git repos or repos that need credentials in the vcpkg build, then those credentials are needed at the build stage or the image cannot be built.

Implementation

I added two build variables: GIT_USER and GIT_TOKEN. These can be set from the command line when invoking the docker build. Then, they're set in the shell when vcpkg build in called. To use them in the vcpkg build, use something like https://$ENV{GIT_USER}:$ENV{GIT_TOKEN}@<url>.git in the portfile.cmake when cloning the git repo.

Notes

N/A

gbuildx commented 1 year ago

Build successful!