scaleway / serverless-scaleway-functions

Plugin for Serverless Framework to allow users to deploy their serverless applications on Scaleway Functions
MIT License
78 stars 25 forks source link

During container build, authenticate to registry to pull private images #103

Closed norbjd closed 2 years ago

norbjd commented 2 years ago

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

norbjd commented 2 years ago

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.