title: How to connect to a minikube cluster from a docker container?
body: <p>I have a running <code>minikube</code> cluster. I can easily connect to it and apply changes using <code>kubectl</code>. But I want to run <code>kubectl</code> from a docker container. Here is the Dockerfile:</p>
  <pre><code>FROM alpine:latest
  
  RUN apk --no-cache add curl
  
  # Install and configure kubectl
  RUN curl -LO &quot;https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl&quot;
  RUN mkdir -p ~/.local/bin/kubectl
  RUN mv ./kubectl ~/.local/bin/kubectl
  RUN chmod +x ~/.local/bin/kubectl/ -R
  </code></pre>
  <p>It's basically a simple <code>alpine</code> image with <code>kubectl</code> installed.</p>
  <p>How can I connect to my <code>minikube</code> cluster from this container?</p>