Interface d'administration Docker

Portainer

Voir aussi :

centurylink/watchtower

https://www.cloudbees.com/blog/docker-guis/

https://github.com/docker/awesome-compose

https://blog.linuxserver.io/2017/04/05/protainer-now-with-lsio/

Kitematic

Rancher

CloudFoundry

IronWorker

Flynn

AppFormix

MesoSphere

DockStation

Nanobox

Dive

docker container run -d \ -p 9000:9000 \ -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce

Voir :https://github.com/portainer/portainer-compose/

Bug avec Traefik websocket

https://stackoverflow.com/questions/46313356/how-to-proxy-websockets-in-traefik
https://github.com/portainer/portainer/issues/2566
https://github.com/portainer/portainer/issues/1671
https://stackoverflow.com/questions/46313356/how-to-proxy-websockets-in-traefik
portainer_1 | 2020/02/28 13:31:20 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
portainer_1 | 2020/02/28 13:57:23 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
curl -k 'https://portainer.acme.local/api/endpoints/2/docker/containers/3c59c72a7dec7027d89f5e202a8bf3aa5538ddd5a1e740aac0e2ac7cc98eae33/exec' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://portainer.acme.local/' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTU4MjkyNjkxNH0.2SfW2jq_fvsEzB8JG9n0e_FY4sKa4Z4RMwzl2W_7A-0' -H 'Connection: keep-alive' -H 'Cookie: portainer.LOGIN_STATE_UUID=17dbccd3-9523-4f7d-8c8d-b18116611ca0; portainer.datatable_text_filter_home_endpoints=; portainer.datatable_settings_stacks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_stack-containers=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%2C%22truncateContainerName%22%3Atrue%2C%22containerNameTruncateSize%22%3A32%2C%22showQuickActionStats%22%3Atrue%2C%22showQuickActionLogs%22%3Atrue%2C%22showQuickActionExec%22%3Atrue%2C%22showQuickActionInspect%22%3Atrue%2C%22showQuickActionAttach%22%3Afalse%7D; portainer.datatable_settings_containers=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%2C%22truncateContainerName%22%3Atrue%2C%22containerNameTruncateSize%22%3A32%2C%22showQuickActionStats%22%3Atrue%2C%22showQuickActionLogs%22%3Atrue%2C%22showQuickActionExec%22%3Atrue%2C%22showQuickActionInspect%22%3Atrue%2C%22showQuickActionAttach%22%3Afalse%7D; portainer.datatable_settings_images=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_networks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_volumes=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_events=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_users=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_roles=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_registries=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_access_registry=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_container-networks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D' -H 'TE: Trailers' --data '{"id":"3c59c72a7dec7027d89f5e202a8bf3aa5538ddd5a1e740aac0e2ac7cc98eae33","AttachStdin":true,"AttachStdout":true,"AttachStderr":true,"Tty":true,"Cmd":["sh"]}'
curl -k 'https://portainer.acme.local/api/websocket/exec?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInJvbGUiOjEsImV4cCI6MTU4MjkyNjkxNH0.2SfW2jq_fvsEzB8JG9n0e_FY4sKa4Z4RMwzl2W_7A-0&endpointId=2&id=75904750db1ba218fd0cd236204c6db6599a5d48576ab70da7c0614469ee514e' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Sec-WebSocket-Version: 13' -H 'Origin: https://portainer.acme.local' -H 'Sec-WebSocket-Extensions: permessage-deflate' -H 'Sec-WebSocket-Key: 6FKYq5f9rmg/L+2oF38BHw==' -H 'Authorization: Basic YWRtaW46ZXJ0ZGZnMTIzLjJL' -H 'Connection: keep-alive, Upgrade' -H 'Cookie: portainer.LOGIN_STATE_UUID=17dbccd3-9523-4f7d-8c8d-b18116611ca0; portainer.datatable_text_filter_home_endpoints=; portainer.datatable_settings_stacks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_stack-containers=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%2C%22truncateContainerName%22%3Atrue%2C%22containerNameTruncateSize%22%3A32%2C%22showQuickActionStats%22%3Atrue%2C%22showQuickActionLogs%22%3Atrue%2C%22showQuickActionExec%22%3Atrue%2C%22showQuickActionInspect%22%3Atrue%2C%22showQuickActionAttach%22%3Afalse%7D; portainer.datatable_settings_containers=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%2C%22truncateContainerName%22%3Atrue%2C%22containerNameTruncateSize%22%3A32%2C%22showQuickActionStats%22%3Atrue%2C%22showQuickActionLogs%22%3Atrue%2C%22showQuickActionExec%22%3Atrue%2C%22showQuickActionInspect%22%3Atrue%2C%22showQuickActionAttach%22%3Afalse%7D; portainer.datatable_settings_images=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_networks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_volumes=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_events=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_users=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_roles=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_registries=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_access_registry=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D; portainer.datatable_settings_container-networks=%7B%22open%22%3Afalse%2C%22repeater%22%3A%7B%22autoRefresh%22%3Afalse%2C%22refreshRate%22%3A%2230%22%7D%7D' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Upgrade: websocket'
Use header remote addr
\"Origin\":[\"https://portainer.acme.local\"],\"Pragma\":[\"no-cache\"],\"Sec-Websocket-Extensions\":[\"permessage-deflate\"],\"Sec-Web$
ocket-Key\":[\"Tk7Xy7+ftPStewJIa3j+yQ==\"],\"Sec-Websocket-Version\":[\"13\"],\"User-Agent\":[\"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0\"],\"X-Forwarded-Host\":$
\"portainer.acme.local\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"],\"X-Forwarded-Server\":[\"3c59c72a7dec\"],\"X-Real-Ip\":[\"192.168.221.5\"]},\
https://www.reddit.com/r/docker/comments/8og58a/cant_access_portainer_behind_apache2_reverse_proxy/
<Location /portainer/>
ProxyPass http://docker.lan:9100/
ProxyPassReverse http://docker.lan:9100/
RequestHeader set Connection ""
</Location>
<Location /portainer/api/websocket/>
RequestHeader set Upgrade $http_upgrade;
RequestHeader set Connection "upgrade"
ProxyPass ws://docker.lan:9100/api/websocket/
</Location>
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
https://www.reddit.com/r/Traefik/comments/cvnar0/traefik_unable_to_see_httphttps_and_websockets_in/