Giter Site home page Giter Site logo

Comments (4)

joaopaulosr95 avatar joaopaulosr95 commented on May 29, 2024 2

You may need to add a --docker-cfg ~/.docker/config.json flag before the push command so it should call ecr-login properly. Also, are you running the manifest-tool binary locally or are you using the official docker image mplatform/manifest-tool:alpine?

Check this working example from one of my Gitlab repos that was set earlier today.

build:docker-merge-tags:
  stage: build
  image:
    name: mplatform/manifest-tool:alpine
    entrypoint: ["/bin/sh"]
  parallel:
    matrix:
    - VARIANT: [gpu, cpu]
  needs:
  - job: build:docker
    optional: true
  script:
  - echo "{\"credsStore\":\"ecr-login\"}" > config.json
  - ARCH="linux/amd64"
  - if [[ "${VARIANT}" == "gpu" ]]; then ARCH="$ARCH,linux/arm64"; fi
  - manifest-tool --docker-cfg config.json push from-args --platforms "${ARCH}"
    --template ${DOCKER_REGISTRY_URL}/${VAR_DOCKER_IMAGE}-${VARIANT}:ARCH-${RELEASE}
    --target ${DOCKER_REGISTRY_URL}/${VAR_DOCKER_IMAGE}-${VARIANT}:${RELEASE}
  - manifest-tool --docker-cfg config.json inspect ${DOCKER_REGISTRY_URL}/${VAR_DOCKER_IMAGE}-${VARIANT}:${RELEASE}
  <<: *docker-rules

Please assume that both AWS_ACCESS_ID and AWS_SECRET_ACCESS_KEY are provided as environment variables to this example.

from manifest-tool.

joaopaulosr95 avatar joaopaulosr95 commented on May 29, 2024

Check #192 #216

from manifest-tool.

dev-whoan avatar dev-whoan commented on May 29, 2024

@joaopaulosr95 Thanks, but I already read the post.

I think since docker cred helper is installed in manifest-tool container image, my configuration should work and it doesn't.

from manifest-tool.

dev-whoan avatar dev-whoan commented on May 29, 2024

You may need to add a --docker-cfg ~/.docker/config.json flag before the push command so it should call ecr-login properly. Also, are you running the manifest-tool binary locally or are you using the official docker image mplatform/manifest-tool:alpine?

lol what I missed that I thought root directory for the container runner user would be root, so the ~/.docker/config.json would be same as /root/.docker/config.json

I mounted it to /root/.docker/config.json as default location, now it works.

Also I adding --docker-cfg ~/.docker/config.json works.

Thanks @joaopaulosr95

from manifest-tool.

Related Issues (20)

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.