Merge pull request #21503 from dvdksn/scout-update-login-syntax

scout: use --password-stdin in docker login examples for integrations
This commit is contained in:
David Karlsson
2024-11-26 12:43:35 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ stages:
# Install the Docker Scout CLI
curl -sSfL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh | sh -s --
# Login to Docker Hub required for Docker Scout CLI
docker login -u $(DOCKER_HUB_USER) -p $(DOCKER_HUB_PAT)
echo $(DOCKER_HUB_PAT) | docker login -u $(DOCKER_HUB_USER) --password-stdin
# Get a CVE report for the built image and fail the pipeline when critical or high CVEs are detected
docker scout cves $(image):$(tag) --exit-code --only-severity critical,high
```

View File

@@ -34,7 +34,7 @@ docker-build:
apk del curl
rm -rf /var/cache/apk/*
# Login to Docker Hub required for Docker Scout CLI
- docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PAT"
- echo "$DOCKER_HUB_PAT" | docker login -u "$DOCKER_HUB_USER" --password-stdin
```
This sets up the workflow to build Docker images with Docker-in-Docker mode,