Did the shell script route work? I have a similar question.
It's a little more complicated because the index URL is not fixed; it contains the token which is only valid for a max of 12 hours. That means the ~/.config/pip/pip.conf
file will also need to be updated every 12 hours. Fortunately, this editing is done automatically by authenticating AWS codeartefact in the command line by logging in.
My current thinking is as follows:
Install the awscli
- pip install awscli
(could also use apt-get install awscli
if pip is not already installed in docker container) Authenticate AWS CodeArtefact, which should also updated ~/.config/pip/pip.conf
- aws codeartifact login --tool pip --repository my-repo --domain my-domain --domain-owner 111122223333
. This should work as expected if the correct IAM permissions/roles are attached to the agent and child container
I would then hope that pip installing inside the new container should have access to the private repository as well as the public