Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-podman: stricter container ID regex to avoid bad matches #13307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 15, 2023

  1. docker-podman: stricter container ID regex to avoid bad matches

    In testing an environment using the docker provider backed by
    podman-docker, I kept running into a problem where the first
    time I tried to bring up a container it would fail because it
    tried to use 'sha256:3' as the container ID. A second attempt
    to bring up the container would always succeed.
    
    On inspection, I think this is happening because, for some
    reason, the output from the 'docker build' command had a line:
    
    Copying config sha256:368a084ba17dcba88f5b23acfa47481131010219524fd9c41af87d709a04845b
    
    *after* the line it wants to match on (a line containing just
    the final container ID). This happens almost every time on one
    host I'm testing on (which is a Fedora 38 host); it doesn't seem
    to happen on the other host (which is Fedora 39). I'm not sure
    why. But we can fix it by just tightening the regex a bit, to
    only match on a line that *starts* with a 64-character
    alphanumeric string, not any line that contains one.
    
    Signed-off-by: Adam Williamson <awilliam@redhat.com>
    AdamWill committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    62996d3 View commit details
    Browse the repository at this point in the history