Comments (11)
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.
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.
Also, for completeness, have you tried docker_pull
with Gitlab and it is working?
from rules_docker.
I have tried docker_pull, it looks like working to me.
from rules_docker.
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:
- POST w/ layer payload as body -- Unsupported by docker/distribution
- POST/PUT w/ layer payload as body of PUT -- pre-1.8
- 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.
Awesome. Thanks for the update and the details.
from rules_docker.
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.
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.
@chaitanya9186 Can you try using the commit in the linked PR and confirm that this resolves your problem?
from rules_docker.
@mattmoor I have just tried it. It is working.
Thanks for the quick fix.
from rules_docker.
Awesome, I'll merge the PR then. LMK if you have any other issues.
from rules_docker.
Related Issues (20)
- When sandbox network is disabled rules_docker rules cannot communicate with docker daemon HOT 1
- Multi-Architecture Support for container_run_and_commit HOT 1
- Shelless invocation for container_run_and_commit HOT 1
- Support multiple python versions in py3_image's py_binary HOT 1
- Support image labels/annotations HOT 1
- Default to Bazel target architecture HOT 2
- Bad timezone for Marocco with @go_image_base//image
- Use binary output from go_binary for go_image
- `container_run_and_extract` does not work with Podman HOT 1
- How to properly use dockerfile_image? HOT 4
- How to get the coredump file in container?
- Sporadic failures of `wrong number of hex digits for sha256`
- The `workdir` for `cc_image` is not the runfiles directory by default.
- go_image always builds for linux/amd64 irrespective of host platform
- rules_nodejs and rules_docker conflict
- container_pull failed for images layers with MediaType "application/vnd.docker.image.rootfs.diff.tar"
- portable_mtime for py3_image
- Support Native Bazel Tags for Build Querying
- py3_image: No Matching Toolchains Found
- rules_docker fails to build with HEAD bazel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_docker.