Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Commit

Permalink
Reauthenticate docker client
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Toosi committed Jul 22, 2023
1 parent a6b24d4 commit ae3c22a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/docker_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@


def authenticate_docker_client():
global DOCKER_CLIENT
print("Authenticating docker client...")
# Authenticate Docker to ECR registry
token = ECR_CLIENT.get_authorization_token()
username, password = (
base64.b64decode(token["authorizationData"]["authorizationToken"])
.decode()
.split(":")
)
DOCKER_CLIENT.login(username, password, registry=ECR_REGISTRY)
DOCKER_CLIENT = docker.from_env()
print(DOCKER_CLIENT.login(username, password, registry=ECR_REGISTRY))


def get_submission_image_tag(submission_id):
Expand Down

0 comments on commit ae3c22a

Please sign in to comment.