Browse Source

added socat to enable `kubectl port-forward`

Fabian Peter Hammerle 4 years ago
parent
commit
131b257c52
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Dockerfile

+ 5 - 1
Dockerfile

@@ -2,11 +2,15 @@ FROM debian:buster-slim
 
 # > cni.go:364] [...] exec: "iptables": executable file not found in $PATH
 # > docker_sandbox.go:394] failed to read pod IP from plugin/docker: networkPlugin cni [...]: unexpected command output nsenter: failed to execute ip: No such file or directory
+# > portforward.go:400] [...] unable to do port forwarding: socat not found
+# https://github.com/kubernetes/kubernetes/blob/v1.17.0/pkg/kubelet/dockershim/docker_streaming_others.go#L42
 RUN apt-get update && apt-get install --yes --no-install-recommends \
     ca-certificates \
     curl \
     iproute2 \
-    iptables
+    iptables \
+    socat `# kubectl port-forward` \
+    util-linux `# nsenter`
 
 # k8s.gcr.io/kube-proxy:v1.17.0 uses legacy iptables
 RUN update-alternatives --set iptables /usr/sbin/iptables-legacy