Hilscher Community Forum
[SOLVED] Authenticate against Docker Registry - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: [SOLVED] Authenticate against Docker Registry (/thread-215.html)

Pages: 1 2


Answer - rehaas - August-14th-2018

Hello Armin,
i updated my netpi with V1.1.3.0RC3 , and i cannot see which portainer Version is used now.
Is it still 1.12 and if yes, when will a newer version will be provided?




Answer - Armin@netPI - August-14th-2018

Hi there,

the version of portainer you can see always if portainer opens and there ou see its version in the low left corner

And yes we kept portainer untouched in its version 1.12.4 in the new netPI release candidate.

Is there a special demand you have you are waiting for? The point is the development of portainer is still very dynamic. Every two weeks there is a new version out. We are happy that 1.12.4 is stable and working without any problems on netPI now since 10 month.


Answer - Armin@netPI - August-14th-2018

One comment in addition to portainer and the version in use.

If you feel there is a feature missing in the Web GUI of portainer io ... Since portainer offers to anybody a RESTful HTTP API that directs all sent API commands to the docker daemon running on netPI one to one, you can access ALL docker functions from remote using this HTTP adressing scheme.

So in the end it is just a matter of missing web GUI offerings only, not of missing docker functions.


RE: Authentificate for Docker Repository - rehaas - August-22nd-2018

Hi Armin,
thx for the reply.
As you mentioned in an earlier post the REST API of portainer is documented here portainer@github
This documentation is only for Portainer >= 1.18.0. There is no documention for Version 1.12 and therefore I asked for a newer
Portainer Version on the netpi.

I could not run the examples using curl and httpie. My commands look like:

curl -X POST --insecure --user admin:password https://myNetPiAddress/api/auth
http POST https://myNetPiAddress/api/auth Username="admin" Password="password"


Maybe you can help me on this topic.

Best regards
Reinhold


RE: Authentificate for Docker Repository - Armin@netPI - August-22nd-2018

You are 100% right. The "old" version 1.12.4 is nowhere described since portainer.io has change the API a little bit in later releases and started to document them instead.

But I have made an example how to access it using Node-RED and its embedded http client to show how to deal with portainer in version 1.12.4.

The post you find here https://forum.hilscher.com/thread-309.html

I have another tip for you. Today's browsers support a debug function and an embedded network analyser. You can record your browser session when you use portainer.io on netPI. Then you can see how the browser deals with the API 1.12.4 and your are able to reconstruct it for your edits.

Find appended a screen shot of my Firefox browser while I was recording a portainer.io login myself as example. You can continue to use portainer.io and see all the other API accesses too in the records.


RE: [SOLVED] Authenticate against Docker Registry - hannes - September-14th-2018

Hello,

is it also possible to authenticate against a remote registry with http basic auth? Username and password?

That would be great.

BR
Hannes


RE: [SOLVED] Authenticate against Docker Registry - Armin@netPI - September-14th-2018

No I am sorry to say that RESTful API of portainer in the version 1.12.4 used on netPI does not support this function.

If you read the latest portainer.io API version 1.19.1 located here https://app.swaggerhub.com/apis/deviantony/Portainer/1.19.1/#/dockerhub/DockerHubUpdate you can see there is the PUT command to "/dockerhub" where you can set username and password as intended.

But we have scheduled now to include portainer.io in the version 1.19.1 in the next coming release in november anyway. Then it will be possible.


RE: [SOLVED] Authenticate against Docker Registry - Armin@netPI - September-14th-2018

Maybe Hannes I understood your question wrong.

Please confirm the following understanding:

You want to run a local registry server that is

a.) trusted using a certificate for authentication
b.) has at least a single user like described in the chapter "Native basic auth" here: https://docs.docker.com/registry/deploying/#importantrequired-http-headers

Is this what you want? So for a proper upload you need a certificate on netPI and username and password. Is my understanding correct?


RE: [SOLVED] Authenticate against Docker Registry - hannes - September-19th-2018

Hi Armin,

sorry for the late reply.

You are slightly right. I already have a docker registry up and running. The authentication method is HTTP Basic authentication. The Registry is running https with a valid certifiate.
My problem now is that i cannot add a registry in portainer with credentials.

I hope you understand what i mean.

BR
Hannes


RE: [SOLVED] Authenticate against Docker Registry - Armin@netPI - September-19th-2018

Yes I know. In portainer 1.12.4 there isn't any. We have to wait for 1.19.x version planned for November.