<p>I want to use <a href="https://www.kubeflow.org/" rel="nofollow noreferrer">Kubeflow</a> to check it out and see if it fits my projects. I want to deploy it locally as a development server so I can check it out, but I have Windows on my computer and Kubeflow only works on Linux. I'm not allowed to dual boot this computer, I could install a virtual machine, but I thought it would be easier to use docker, and oh boy was I wrong. So, the problem is, I want to install Kubernetes in a docker container, right now this is the Dockerfile I've written:</p>
<pre><code># Docker file with local deployment of Kubeflow
FROM ubuntu:18.04

ENV USER=Joao
ENV PASSWORD=Password
ENV WK_DIR=/home/${USER} 

# Setup Ubuntu
RUN apt-get update -y
RUN apt-get install -y conntrack sudo wget

RUN useradd -rm -d /home/${USER} -s /bin/bash -g root -G sudo -u 1001 -p ${PASSWORD} ${USER}
WORKDIR ${WK_DIR}

# Installing Docker CE
RUN apt-get install -y apt-transport-https ca-certificates curl software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \
    &quot;deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable&quot;
RUN apt-get update -y
RUN apt-get install -y docker-ce docker-ce-cli containerd.io

# Installing Kubectl
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin/kubectl

# Installing Minikube
RUN curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
RUN install minikube-linux-amd64 /usr/local/bin/minikube


ENV PATH=&quot;${PATH}:${WK_DIR}&quot;
COPY start.sh start.sh
CMD sh start.sh
</code></pre>
<p>With this, just to make the deployment easier, I also have a docker-compose.yaml that looks like this:</p>
<pre><code>services:
  kf-local:
    build: .
    volumes:
      - path/to/folder:/usr/kubeflow
    privileged: true
</code></pre>
<p>And start.sh looks like this:</p>
<pre><code>service docker start

minikube start \
     --extra-config=apiserver.service-account-issuer=api \
     --extra-config=apiserver.service-account-signing-key-file=/var/lib/minikube/certs/apiserver.key \
     --extra-config=apiserver.service-account-api-audiences=api \
     --driver=docker
</code></pre>
<p>The problem is, whenever I try running this I get the error:</p>
<pre><code>X Exiting due to DRV_AS_ROOT: The &quot;docker&quot; driver should not be used with root privileges.
</code></pre>
<p>I've tried creating a user and running it from there also but then I'm not being able to run sudo, any idea how I could install Kubernetes on a Docker container?</p>

<p>As you thought you are right in case of using VM and that be easy to test it out.</p>
<p>Instead of setting up Kubernetes on docker you can use Linux base container for development testing.</p>
<p>There is linux container available name as LXC container. Docker is kind of application container while in simple words LXC is like VM for local development testing. you can install the stuff into rather than docker setting up application inside image.</p>
<p>read some details about lxc : <a href="https://medium.com/@harsh.manvar111/lxc-vs-docker-lxc-101-bd49db95933a" rel="nofollow noreferrer">https://medium.com/@harsh.manvar111/lxc-vs-docker-lxc-101-bd49db95933a</a></p>
<p>you can also run it on windows and try it out at : <a href="https://linuxcontainers.org/" rel="nofollow noreferrer">https://linuxcontainers.org/</a></p>
<p>If you have read the documentation of <strong>Kubeflow</strong> there is also one option <a href="https://www.kubeflow.org/docs/started/workstation/getting-started-linux/#multipass" rel="nofollow noreferrer">multipass</a></p>
<blockquote>
<p>Multipass creates a Linux virtual machine on Windows, Mac or Linux
systems. The VM contains a complete Ubuntu operating system which can
then be used to deploy Kubernetes and Kubeflow.</p>
</blockquote>
<p>Learn more about Multipass : <a href="https://multipass.run/#install" rel="nofollow noreferrer">https://multipass.run/#install</a></p>
