Giter Site home page Giter Site logo

Comments (11)

chaitanya9186 avatar chaitanya9186 commented on May 26, 2024

Forgot to mention:
I able to use docker_build rule to build and tag the docker image and able to push the same using docker push <image> command.

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

Thanks for filing the issue!

I will try to reproduce this myself, but it smells like an incompatibility with Gitlab (I'll have to find a way to set up an account to test pushing).

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

Also, for completeness, have you tried docker_pull with Gitlab and it is working?

from rules_docker.

chaitanya9186 avatar chaitanya9186 commented on May 26, 2024

I have tried docker_pull, it looks like working to me.

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

Ah, I know what the problem is.

This is using a variant of the specification that is more efficient (for the sizes of layers typically produced by Bazel), but that docker/distribution does not implement, but that I implemented in GCR.

Basically, for blob uploads there are three modes:

  1. POST w/ layer payload as body -- Unsupported by docker/distribution
  2. POST/PUT w/ layer payload as body of PUT -- pre-1.8
  3. POST/PATCH/PUT w/ layer payload as body of PATCH -- 1.8+

Cross-repo mounting is sort of like a 1b., but it falls back on 3. when it fails.

The client we use has dormant functionality to implement the other modes (that I implemented for benchmarking which was best), but it'll take a little doing to update the unit testing with the new requests to expect.

My apologies, I had forgotten we used this under the hood. I'll try to get a fix in and a new release cut in the next few days.

from rules_docker.

chaitanya9186 avatar chaitanya9186 commented on May 26, 2024

Awesome. Thanks for the update and the details.

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

This comment spells it out the best, and you are the unfortunate victim of my TODO :)
https://github.com/google/containerregistry/blob/master/client/v2_2/docker_session_.py#L183

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

tl;dr I have a couple changes out for (internal) review to the underlying tooling that performs the push, which I believe will resolve this.

With these changes I have already successfully pushed an image to DockerHub and Gitlab, but...

After setting up an account on registry.gitlab.com my initial attempt at using it to push there has resulted in a failure similar to one I initially encountered with JFrog's bintray, which was a result of them using a feature of HTTPS called SNI.

The problem is that the version of python 2.7 bundled with the latest Ubuntu LTS is a couple minor versions short of where this is added. You can see my more detailed comment here.

The good news (for you) is that if docker_pull was successful and docker_push got as far as the failure you experienced, then you are already past this and shouldn't have this problem.

I'll add a limited pull test for Gitlab (similar to the above bintray) to the Travis configuration shortly.

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

@chaitanya9186 Can you try using the commit in the linked PR and confirm that this resolves your problem?

from rules_docker.

chaitanya9186 avatar chaitanya9186 commented on May 26, 2024

@mattmoor I have just tried it. It is working.

Thanks for the quick fix.

from rules_docker.

mattmoor avatar mattmoor commented on May 26, 2024

Awesome, I'll merge the PR then. LMK if you have any other issues.

from rules_docker.

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.