Skip to content

Commit b4009ba

Browse files
committed
use docker login with --password-stdin
1 parent a53b83d commit b4009ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

verify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ docker run -d -p 5000:5000 --name registry \
8080

8181
# Step 2: Tag and push an image to the local registry with authentication
8282
echo "Tagging and pushing an image to the local registry with authentication..."
83+
echo "password" | docker login localhost:5000 -u user --password-stdin
8384
docker tag alpine:latest localhost:5000/alpine
84-
docker login localhost:5000 -u user -p password
8585
docker push localhost:5000/alpine
8686

8787
# Step 3: Verify the image in the local registry

0 commit comments

Comments
 (0)