question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use only push side

See original GitHub issue

Hi all,

I already use jib maven plugin to build the docker image then I’m trying to use only the push part but it seems is trying to also build the image.

Does anyone know if is that possible to achieve? I have tried in different ways with custom builder and context path but getting same error, following yml configuration.

https://github.com/rodrigorodrigues/microservices-design-patterns/blob/master/.github/workflows/docker-build-push-image-authentication-service.yml

context: .

  - name: Set up Docker Buildx
    uses: docker/setup-buildx-action@v1

  # Build the Docker image with Maven
  - name: Build
    run: |
      mvn clean install -q -pl authentication-service -am -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dspring.profiles.active=travis jib:dockerBuild
  # Login to Dockerhub
  - name: Login to DockerHub
    uses: docker/login-action@v1
    with:
      username: ${{ secrets.DOCKERHUB_USERNAME }}
      password: ${{ secrets.DOCKERHUB_TOKEN }}

  # Push the Docker image
  - name: Push
    id: docker_build
    uses: docker/build-push-action@v2
    with:
      context: .
      push: true
      tags: fielcapao/microservices-design-patterns:authentication-service

custom builder

  - name: Set up Docker Buildx
    uses: docker/setup-buildx-action@v1
    id: buildx
    with:
      install: false

  # Build the Docker image with Maven
  - name: Build
    run: |
      mvn clean install -pl authentication-service -am -B -Dspring.profiles.active=travis jib:dockerBuild
  # Login to Dockerhub
  - name: Login to DockerHub
    uses: docker/login-action@v1
    with:
      username: ${{ secrets.DOCKERHUB_USERNAME }}
      password: ${{ secrets.DOCKERHUB_TOKEN }}

  # Push the Docker image
  - name: Push
    id: docker_build
    uses: docker/build-push-action@v2
    with:
      builder: ${{ steps.buildx.outputs.name }}
      push: true
      tags: fielcapao/microservices-design-patterns:authentication-service

Error:

Run docker/build-push-action@v2
📣 Buildx version: 0.4.2
🏃 Starting build...
/usr/bin/docker buildx build --tag ***/microservices-design-patterns:authentication-service --iidfile /tmp/docker-build-push-LfaVqe/iidfile --file ./Dockerfile --push .
time="2020-11-06T20:13:32Z" level=warning msg="invalid non-bool value for BUILDX_NO_DEFAULT_LOAD: "
#2 [internal] load .dockerignore
#2 transferring context: 2B 0.0s done
#2 DONE 0.1s

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2B 0.0s done
#1 DONE 0.1s
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /tmp/buildkit-mount572794755/Dockerfile: no such file or directory
Error: buildx call failed with: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /tmp/buildkit-mount572794755/Dockerfile: no such file or directory

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
crazy-maxcommented, Nov 6, 2020

@rodrigorodrigues

I’m trying to use only the push part but it seems is trying to also build the image.

That’s not the purpose of this action but you can use docker push in a shell step:

  - name: Build
    run: |
      mvn clean install -q -pl authentication-service -am -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dspring.profiles.active=travis jib:dockerBuild
  - name: Login to DockerHub
    uses: docker/login-action@v1
    with:
      username: ${{ secrets.DOCKERHUB_USERNAME }}
      password: ${{ secrets.DOCKERHUB_TOKEN }}
  - name: Push
    run: |
      docker push fielcapao/microservices-design-patterns:authentication-service

But looking at your maven logs, I don’t see anything related to a “docker build”.

1reaction
crazy-maxcommented, Nov 21, 2020

@akhilerm Yes you can push multi platform images with this action, see https://github.com/docker/build-push-action#multi-platform-image.

(Need to push to dockerhub, quay etc).

To push to multi registries, see https://github.com/docker/build-push-action#push-to-multi-registries

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Get A Massive Chest With Only Push-Ups (NO ...
Brace your core and fully extend your legs. Then, for 30 seconds, while keeping your body as stable as possible and without sagging...
Read more >
5 Common Push-Up Mistakes to Avoid - Nerd Fitness
In other words, when you drop into your standard push-up, your upper arms should be at your sides at about a 45 degree...
Read more >
git push to specific branch - Stack Overflow
git push origin amd_qlp_tester will work for you. ... time you can just use git push/pull if not already linked (only need to...
Read more >
How To Do A Push Up With Perfect Form - BuiltLean
When you perform a push-up, the only parts of your body that should be moving are your arms. Everything else should be stiff...
Read more >
Push Options - GitLab Docs
GitLab supports using client-side Git push options to perform various actions at the same ... Only skips branch pipelines and not merge request...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found