serverless-scaleway-functions
serverless-scaleway-functions copied to clipboard
During container build, authenticate to registry to pull private images
If the container build depends on an image located in a private registry, we now authenticate against that registry (as long as the registry where the pulled image is located is the same as the registry where the resulting image is pushed).
For example, this works if both images are in rg.fr-par.scw.cloud
for example, but not if the base image is in rg.nl-ams.scw.cloud
and the container is in fr-par
region (image will be pushed in rg.fr-par.scw.cloud
).
If we want to support the previous use-case, we have no way but parsing the Dockerfile
and look for base images, pull these images with the correct credentials (that the user should supply).
Fixes #98
LGTM. Is there any way of testing this? I guess we don't have a private registry to use in the integration tests?
@Shillaker I've added an integration test in my last commit (b83bac0) to test with a private registry.