I'm working with VSCode dev containers, and the container should pip install modules that reside on AWS CodeArtifact.
First, I need to sso login on the host machine, before the container is built, so I added the following configuration to devcontainer.json:
{
...
"initializeCommand": "aws sso login --profile dev"
...
}
Here lies my problem. The container should install the modules, so I need it to have the proper permissions.
I run $ aws codeartifact get-authorization-token on the host machine and I need to pass the token to the container. How can I do it?
As far as I know there is no option to pass dynamic values as an environment variable, and using script to create files seems very cumbersome for such a simple task.