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.
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 theportfile.cmake
when cloning the git repo.Notes
N/A