Git Product home page Git Product logo

Comments (3)

jonasbb avatar jonasbb commented on June 12, 2024

You changed both files prepare.sh and cleanup.sh as shown in your post, but podman is pulling the image every time. Did I understand your problem correctly?

Your change looks good. You also want to copy the --authfile "$CACHE_DIR"/_authfile_"$CONTAINER_ID" argument to the podman run call though, as otherwise the authentication might be missing. A --pull= argument could be present in PODMAN_RUN_ARGS, but by default the variable is unused.

I could imagine changing the code to something like this, such that the pull policy could be overwritten in PODMAN_RUN_ARGS. It seems that the last specified value wins. But I am not sure if this might lead to problems when podman and rm race to access the authfile.

    podman run \
        --detach \
        --authfile "$CACHE_DIR"/_authfile_"$CONTAINER_ID" \
        --pull=always \
        --name "$CONTAINER_ID" \
        --volume "$CACHE_DIR:/home/user/cache":Z \
        "${PODMAN_RUN_ARGS[@]}" \
        "$IMAGE"\
        sleep 999999999
    rm "$CACHE_DIR"/_authfile_"$CONTAINER_ID"

from podman-gitlab-runner.

worthlesspenny7 avatar worthlesspenny7 commented on June 12, 2024

Thanks @jonasbb! Yes, you summarized my problem correctly. I'll attempt what you've suggested and get back to you next week.

from podman-gitlab-runner.

worthlesspenny7 avatar worthlesspenny7 commented on June 12, 2024

I wasn't able to get to this and I'm about to go on vacation. I'll close this for now and update when I can try again.

from podman-gitlab-runner.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.