self-cert notary server with port is not support by docker trust in Docker for Windows
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Docker trust for notary server url with port (eg https://notary.example.com:4443 ) is not work in Docker for Windows
Docker will read certs from C:\Users\xxx.docker\tls\notary.example.com:4443 dirs, but I can not create dir with : in Windows.
I think certificateDirectory should be cleaned in Windows.
Steps to reproduce the issue:
- create C:\Users\xxx.docker\tls\notary.example.com4443 dir and copy ca.crt to it
- $env:DOCKER_CONTENT_TRUST_SERVER='https://notary.example.com:4443'
- $env: DOCKER_CONTENT_TRUST=1
- docker -D push index.example.com/foo/dotnet-samples:dotnetapp
Describe the results you received:
The push refers to repository [index.example.com/foo/dotnet-samples:dotnetapp]
xxxxxxx: Layer already exists
xxxxxxx: Layer already exists
xxxxxxx: Layer already exists
dotnetapp: digest: sha256:xxxxxx size: 2406
Signing and pushing trust metadata
DEBU[0001] reading certificate directory: C:\Users\xxx.docker\tls\notary.example.com:4443
DEBU[0001] Error pinging notary server "hosts://notary.example.com:4443/v2/": Get https://notary.example.com:4443/v2/: x509: certificate signed by unknow authority
DEBU[0001] Making dir path: C:\Users\xxx.docker\trust\tuf\index.example.com\foo\dotnet-samples\changelist
Error: error contacting notary server: x509: certificate signed by unknow authority
Describe the results you expected:
Push the image to registry and successfully signed
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Output of docker info:
(paste your output here)
Additional environment details (AWS, VirtualBox, physical, etc.):
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named in the issue. Reproduce the Docker for Windows push with a notary URL containing port 4443, then trace how Docker CLI builds the certificate directory path from that URL. Done means the port-bearing notary server can use its CA certificate and the trust metadata push succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100