Skip to content

Commit b241300

Browse files
add docker login
1 parent 0b8e580 commit b241300

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

buildspec.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ phases:
77
docker: 18
88
pre_build:
99
commands:
10-
- start-dockerd
10+
- docker_token=$(aws secretsmanager get-secret-value --secret-id /codebuild/docker/token | jq ".SecretString|fromjson")
11+
- username=$(echo ${docker_token} | jq ".[0]" | sed 's/"//g')
12+
- password=$(echo ${docker_token} | jq ".[1]" | sed 's/"//g')
13+
- docker login --username ${username} --password ${password} > /dev/null 2>&1
1114
- echo Logging in to Amazon ECR...
1215
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
1316
- pip install -r src/requirements.txt

0 commit comments

Comments
 (0)