tilt
tilt copied to clipboard
registry host when pushing image is `unknown`
Steps to Reproduce
I have this weird behaviour from vscode devcontainer, any ideas why my host for registry is unknown ?
ctlptl create cluster k3d --registry=ctlptl-registry
k8s_yaml('k8s/ingest.yaml')
docker_build('ingest-image',
dockerfile='./services/Dockerfile.ingest',
context='./services',
live_update=[
sync('./services/ingest.py', '/opt/services/ingest.py'),
]
)
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingest
labels:
app: ingest
spec:
selector:
matchLabels:
app: ingest
template:
metadata:
labels:
app: ingest
spec:
containers:
- name: ingest
image: ingest-image
ports:
- containerPort: 3000
Current Behavior
Pushing unknown:55347/ingest-image:tilt-f179af15c6e37548
Pushing with Docker client
Authenticating to image repo: unknown:55347
Sending image data
Build Failed: docker push: pushing image "unknown:55347/ingest-image": Get "[https://unknown:55347/v2/":](https://unknown:55347/v2/%22:) dial tcp: lookup unknown on 192.168.65.7:53: no such host
Context
Tilt: v0.33.20, built 2024-09-03
System: linux-arm64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 27.0.3-1
- API Version: 1.46
- Builder: 2
- Compose Version: v2.30.1
---
Kubernetes
- Env: k3d
- Context: k3d-k3s-default
- Cluster Name: k3d-k3s-default
- Namespace: default
- Container Runtime: containerd
- Version: v1.30.4+k3s1
- Cluster Local Registry: &RegistryHosting{Host:unknown:55347,HostFromClusterNetwork:ctlptl-registry:5000,HostFromContainerRuntime:ctlptl-registry:5000,Help:https://k3d.io/stable/usage/registries/#using-a-local-registry,SingleName:,}
ok, I was able to fix it running commands separately
ctlptl create registry registry --port=5005
ctlptl create cluster k3d --registry=registry
tilt doctor
- Cluster Local Registry: &RegistryHosting{Host:127.0.0.1:5005,HostFromClusterNetwork:registry:5000,HostFromContainerRuntime:registry:5000,Help:https://k3d.io/stable/usage/registries/#using-a-local-registry,SingleName:,}
how is the devcontainer set up?
can you try this with the latest version of ctlptl? we made some improvements to the registry resolution logic in 0.8.35