how to run simple minikube inside docker?


I’m trying to follow instructions on this guide but under docker.

I set up a folder with:

├── Dockerfile
0 directories, 2 files is:

#!/usr/bin/env python3

print("Docker is magic!")

Dockerfile is:

FROM python:latest
CMD [ "python", "./" ]

FROM python:3.7-alpine
COPY ./ /usr/src/app/
WORKDIR /usr/src/app
RUN apk add curl openssl bash --no-cache
RUN curl -LO "$(curl -s" 
    && chmod +x ./kubectl 
    && mv ./kubectl /usr/local/bin/kubectl

kubectl create deployment hello-node

kubectl expose deployment hello-node --type=LoadBalancer --port=38080

minikube start --driver=docker

kubectl get pods

When I run docker run python-test I see in terminal:

Docker is magic!

but I don’t see the get pods output.

My goal here is to run a simple minikube in the docker that just print the list of the pods. What is wrong here?

Source: Docker Questions

Categorised as docker, kubernetes, minikube Tagged , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us