コード例 #1
0
 def _get_docker_registry_secret(self) -> str:
     """Create a secret containing credentials for logging into the defined docker registry"""
     docker_credentials = DockerRegistry(self.config,
                                         self.env).credentials()
     return b64_encode(
         json.dumps({
             "auths": {
                 docker_credentials.registry: {
                     "username":
                     docker_credentials.username,
                     "password":
                     docker_credentials.password,
                     "auth":
                     b64_encode(
                         f"{docker_credentials.username}:{docker_credentials.password}"
                     ),
                 }
             }
         }))
コード例 #2
0
ファイル: build_docker_image.py プロジェクト: srmds/takeoff
 def __init__(self, env: ApplicationVersion, config: dict):
     super().__init__(env, config)
     self.docker_credentials = DockerRegistry(self.config, self.env).credentials()