knative / knative/func

Add TLS certificate support for Docker contexts

Open
#3,719 1 comment 0 reactions 1 assignee Claimed by @Itx-Psycho0 View on GitHub
Dominant language
Go
Stars
365
Forks
223
Avg merge
2d 3h
Merged PRs (30d)
25

Description

Problem
PR #3684 added Docker context detection but only extracts the host URL. Docker contexts can also store TLS certificates for secure remote connections, which are currently ignored.

When a context is configured with TLS:

docker context create remote \
--docker "host=tcp://remote.example.com:2376"
The Docker CLI works fine, but func fails to connect because it doesn't load the TLS certificates from the context.

Proposed Solution
Extend getDockerContextHost() to also read TLS configuration from the context's meta.json and tls/ directory:

~/.docker/contexts/meta//
├── meta.json
└── tls/
├── ca.pem
├── cert.pem
└── key.pem
Then configure the Docker client with these certificates when connecting to remote daemons (tcp://, ssh://).

Benefits
Remote Docker setups work automatically
Consistent with Docker CLI behavior
No manual environment variables needed
Proper TLS support for secure connections
Related
Issue #2226
PR #3684

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.