-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Docker build badge: repo not found #1400
Comments
Looks like something wrong in the build history API for the project, sinedied/nano-gateway pulls response: {
"user": "sinedied",
"name": "nano-gateway",
"namespace": "sinedied",
"repository_type": "image",
"status": 1,
"description": " Lightweight API gateway for home-scale projects",
"is_private": false,
"is_automated": false,
"can_edit": false,
"star_count": 1,
"pull_count": 15,
"last_updated": "2017-12-27T21:46:54.850913Z",
"has_starred": false,
"full_description": "# nano-gateway\n\n[![NPM version](https://img.shields.io/npm/v/nano-gateway.svg)](https://www.npmjs.com/package/nano-gateway) [![Build status](https://img.shields.io/travis/sinedied/nano-gateway/master.svg)](https://travis-ci.org/sinedied/nano-gateway) ![Node version](https://img.shields.io/badge/node-%3E%3D6.0.0-brightgreen.svg) [![Docker layers](https://images.microbadger.com/badges/image/sinedied/nano-gateway.svg)](https://microbadger.com/images/sinedied/nano-gateway) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n![](https://user-images.githubusercontent.com/593151/34394053-379cfa3c-eb57-11e7-855d-ef15cc5d3bcb.png)\n\n> Lightweight API gateway for home-scale projects.\n\n**Features:**\n- Single-file YAML configuration\n- HTTPS support\n- Secure endpoints with API key\n- URL rewriting\n- Less than [50 LOC](index.js) :smile:\n\n## Installation\n\n```bash\nnpm install -g nano-gateway\n```\n\n## Usage\n```sh\nnanog --help\nUsage: nanog [--config file.yml] [--keygen]\n```\n\nUse the `nanog` command to start the gateway.\n\nBy default, it will use the `config.yml` configuration in the current working directory, but any file can be specified\nusing either the `NANO_GATEWAY_CONFIG` environment variable or the `--config` option.\n\nThe `--keygen` will generate a suitable API key to use in your configuration.\n\n## Configuration\n\nHere is an [example config.yml](config.yml) configuration:\n\n```yaml\nhttp: # optional, enable HTTP gateway\n port: 8080 # optional, specify port for HTTP (default is 8080)\nhttps: # optional, enable HTTPS gateway\n cert: 'cert.pem' # required, certificate path\n key: 'privkey.pem' # required, private key path\n ca: 'chain.pem' # optional, override trusted CA certificates\n port: 8443 # optional, specify port for HTTPS (default is 8443)\nauth: true # optional, enable API key authorization by default for all services\napiKey: '123456' # required if auth is enabled, use nanog --keygen to generate a new key\nservices: # required, define here the services to proxify\n ip: # required, service name\n path: '/ip' # required, endpoint(s) (use Express route syntax, see npmjs.com/path-to-regexp)\n url: 'https://httpbin.org' # required, target url for\n auth: false # optional, authorization can be set or overriden by service\n quote: # another service, add as many as you need\n path: '/jokes/*' # matches any routes under /jokes/\n rewrite: '/jokes/random' # optional, rewrite URL (for syntax, see npmjs.com/express-urlrewrite)\n url: 'https://api.chucknorris.io'\n```\n\n### API key\n\nEndpoints secured by API key can be consumed either by using an `apiKey` query parameter:\n```sh\ncurl https://gateway.com/endpoint?apiKey=<your_api_key>\n```\nor by using an `Authorization` header:\n```sh\ncurl -H \"Authorization: <your_api_key>\" https://gateway.com/endpoint\n```\n\n> Note: It is **strongly** recommended to use only HTTPS with API keys, otherwise your credentials will circulate in\n> clear over the network and may be intercepted.\n\n### HTTPS\n\nTo enable HTTPS you need a valid SSL certificate.\n\nFree [LetsEncrypt](https://letsencrypt.org) certificates can be obtained using [certbot](https://certbot.eff.org).\n\nFor testing purposes, you can also generate a self-signed certificate using this command:\n```sh\nopenssl req -nodes -new -x509 -keyout privkey.pem -out cert.pem\n```\n\nAfter you have your certificate, use it in your configuration like this:\n```yaml\nhttps:\n cert: 'cert.pem'\n key: 'privkey.pem'\n ca: 'chain.pem' # optional, override trusted CA certificates\n```\n\n## Running on Docker\n\nA minimal [Docker image](https://hub.docker.com/r/sinedied/nano-gateway/) based on `node:alpine` is also available\nfor deployment.\n\nYou just need to map a folder with a `config.yml` file in it to the `/config` volume:\n```\ndocker pull sinedied/nano-gateway\ndocker run --d -v <your_config_dir>:/config -p 8443:8443 --name nano-gateway sinedied/nano-gateway\n```\n",
"affiliation": null,
"permissions": {
"read": true,
"write": false,
"admin": false
}
} sinedied/nano-gateway buildhistory response: (also returns 404 status code) {
"detail": "Object not found"
} correct buildhistory reponse: {
"count": 1572,
"next": "https://registry.hub.docker.com/v2/repositories/jrottenberg/ffmpeg/buildhistory/?page=2",
"previous": null,
"results": [
{
"id": 17779528,
"status": 10,
"created_date": "2017-12-15T15:12:42.511729Z",
"last_updated": "2017-12-16T13:48:55.875532Z",
"build_code": "bdf9g5ua3cd2q8rkmud6hne",
"dockertag_name": "3.1-centos",
"cause": "REPOSITORY_LINK"
},
{
"id": 17771912,
"status": 10,
"created_date": "2017-12-15T13:56:12.675237Z",
"last_updated": "2017-12-16T12:28:34.842744Z",
"build_code": "bmveanfungnkwxk48jcqw6m",
"dockertag_name": "3.2",
"cause": "REPOSITORY_LINK"
},
{
"id": 17771832,
"status": 10,
"created_date": "2017-12-15T13:56:10.751691Z",
"last_updated": "2017-12-16T11:28:48.707129Z",
"build_code": "b5teh6hpgj6yk6tufrqtqdb",
"dockertag_name": "3.4",
"cause": "REPOSITORY_LINK"
},
{
"id": 17771584,
"status": 10,
"created_date": "2017-12-15T13:56:05.890924Z",
"last_updated": "2017-12-16T10:23:44.550701Z",
"build_code": "brsaswwsow2tgsmift2gayw",
"dockertag_name": "3.0-alpine",
"cause": "REPOSITORY_LINK"
},
{
"id": 17771443,
"status": 10,
"created_date": "2017-12-15T13:56:02.887293Z",
"last_updated": "2017-12-16T09:14:47.049854Z",
"build_code": "bzsaayibuc5ejhyingppqxb",
"dockertag_name": "3.1-scratch",
"cause": "REPOSITORY_LINK"
},
{
"id": 17771336,
"status": 10,
"created_date": "2017-12-15T13:56:00.598746Z",
"last_updated": "2017-12-16T08:04:57.543595Z",
"build_code": "bmcop3u4uyrprwo8ztwrnfn",
"dockertag_name": "3.4-scratch",
"cause": "REPOSITORY_LINK"
},
{
"id": 17750450,
"status": -1,
"created_date": "2017-12-15T05:48:00.147004Z",
"last_updated": "2017-12-16T06:50:50.305672Z",
"build_code": "bjexbv4n9zgwukwwpr7bszf",
"dockertag_name": "2.8-scratch",
"cause": "REPOSITORY_LINK"
},
{
"id": 17750447,
"status": -1,
"created_date": "2017-12-15T05:48:00.116812Z",
"last_updated": "2017-12-16T06:43:12.610414Z",
"build_code": "bvllv3357xckhpolynax3nm",
"dockertag_name": "2.8-scratch",
"cause": "REPOSITORY_LINK"
},
{
"id": 17750392,
"status": 10,
"created_date": "2017-12-15T05:47:59.262740Z",
"last_updated": "2017-12-16T05:23:53.647735Z",
"build_code": "bntg2dmyevtzni4lzm9me8e",
"dockertag_name": "2.8-scratch",
"cause": "REPOSITORY_LINK"
},
{
"id": 17743030,
"status": -1,
"created_date": "2017-12-15T03:48:43.823348Z",
"last_updated": "2017-12-16T04:14:53.741367Z",
"build_code": "btcc6mxzkscjl3esthgdm4c",
"dockertag_name": "3.3-scratch",
"cause": "REPOSITORY_LINK"
}
]
} |
I just created the repo on docker hub, maybe it needs some time to chew the info then? |
That's another error, I have setup automated builds 😄 |
@sinedied can you confirm problem is solved? https://registry.hub.docker.com/v2/repositories/sinedied/nano-gateway/ |
@iamstarkov it seems to be the build history endpoint that is missing info. |
I'm seeing the same thing. Out of curiosity - is this resolved on dockers side or do we think this is going to be broken permanently? |
Not really sure how to go about solving this, i think someone will have to contact docker about it as the API just returns a |
I'm having the same issue, would love to hear from anyone who managed to resolve this. |
Just ran into the same thing with one of my projects. I think this is probably because Docker Hub != Docker Cloud, i.e. builds on Docker Cloud do not show up under the build history in Docker Hub - seems they are treated as two separate build services (see https://stackoverflow.com/a/42736552). From some quick tests, builds generated from Docker Hub show as expected whereas builds from Docker Cloud don't. I guess a fix would be to also point to the api specific for Docker Cloud builds... |
I am having similar issues with my repository: https://cloud.docker.com/u/genenotebook/repository/docker/genenotebook/genenotebook Docker pulls are being displayed correctly: However, automated build is listed incorrectly as manual: Build status says the repository is not found: This is incorrect, as I have enabled automated builds and they have completed building. |
This page is a 404 for me: https://cloud.docker.com/u/genenotebook/repository/docker/genenotebook/genenotebook |
Interesting, apparently Docker Cloud does not allow browsing. |
Ran into the same issue. Noticed that it started happening roughly around the same time as DockerHub UX was revamped. Could it be that DockerHub made some breaking changes to their API? |
Yes also got this issue |
Same for me https://github.com/texano00/docker-ionic-android |
need to support docker cloud, docker hub may not be used in the future? |
Just wanted to put out there that Shields is a community project, and that means you can help make this happen! We have a great tutorial and welcome anyone who would like to dig into this! Our maintainer team is happy to provide guidance on the API design and provide assistance with the implementation. We've had many first-time contributors who don't use JavaScript and have tried to make the first-time contributing experience as straightforward as possible. |
Added badges showing status of docker builds. Due to a possible bug in the shields, the docker hub repository is not found. See badges/shields#1400
An "old" automated build: $ curl -s 'https://hub.docker.com/api/build/v1/source/?image=xenolf%2Flego' -H 'Accept: application/json' | jq
{
"meta": {
"limit": 25,
"next": null,
"offset": 0,
"previous": null,
"total_count": 0
},
"objects": []
} A "new" automated build: $ curl -s 'https://hub.docker.com/api/build/v1/source/?image=ldez%2Fgha-mjolnir' -H 'Accept: application/json' --compressed | jq
{
"meta": {
"limit": 25,
"next": null,
"offset": 0,
"previous": null,
"total_count": 1
},
"objects": [
{
"autotests": "OFF",
"build_in_farm": true,
"build_settings": [
"/api/build/v1/setting/e3db21aa-8847-4789-9f2e-dc136ea432ae/",
"/api/build/v1/setting/6fe17d9d-a946-47f0-a7ae-b20dba0bfb72/"
],
"channel": "Stable",
"image": "ldez/gha-mjolnir",
"owner": "ldez",
"provider": "Github",
"repo_links": false,
"repository": "gha-mjolnir",
"resource_uri": "/api/build/v1/source/9a37d4ca-aad6-4820-932c-5d8bd94fc8d7/",
"state": "Success",
"uuid": "9a37d4ca-aad6-4820-932c-5d8bd94fc8d7"
}
]
}
Note: It's possible to use FYI those API endpoints are called by the hub it-self. |
Thanks again @ldez! #3139 adds new badges (Docker Cloud Automated Build and Docker Cloud Build Status) that should provide a working badge for those experiencing issues with the current Docker Automated/Build Status badges. It should get deployed fairly soon, and anyone interested can follow the deployment status of #3139 here Note that the Docker Cloud badges have a different path with Will use the Docker Cloud badge path: https://img.shields.io/docker/cloud/build/sinedied/nano-gateway.svg (this will start working once #3139 is deployed) |
It would be helpful to add some documentation to the Docker Build badge guiding people to the new badge for Docker Cloud. What should it say, exactly? |
I was thinking the same thing. Perhaps something along the lines of:
|
All images created with the new Docker Hub only works with the Docker Cloud badges. No one really uses the term Docker Cloud: it's just the Docker hub. https://hub.docker.com/ |
Did not realize Cloud branding had been dropped, thanks for sharing. This now has me wondering if we really need to have both sets of our Docker badges. Will our new badges (which are currently labeled as Docker Cloud badges) work for all users/images? If so is there any value in keeping our old badges? |
Docker badges work well with repositories created before the "new" Docker Hub. So it's difficult to remove the Docker badges due to that. |
I think something along those lines might be best in the docs then, and we could do it on both the "old" Docker Hub badges and the new Docker "Cloud" badges. I.e. Use this badge if your repository was created after xyz and vice versa |
Sounds like a good idea. Since people don't know they are using Docker "Cloud", maybe it would be good to add |
Added badges showing status of docker builds. Due to a possible bug in the shields, the docker hub repository is not found. See badges/shields#1400
New badges need to be used since some changes in Docker Hub. See See badges/shields#1400
New badges need to be used since some changes in Docker Hub. See See badges/shields#1400
Same repo. Am I missing something?
The text was updated successfully, but these errors were encountered: