Using commands in bluemix user interface - docker

I need to use docker container in bluemix but my laptop does not support docker so I can't use the commands to run docker in bluemix using the CLI plug-ins.
Is there any other way to do this?

Why can't you run it on your laptop? Docker can run in some flavor on most operating systems (albeit within a VM on some).
You have a number of options though:
Run it inside a linux virtual machine locally
Run it inside a cloud linux virtual machine
Run it inside a cloud container - Yes, you can actually run Docker inside a Docker container.
Install a linux OS as a dual boot option on your laptop and run Docker there.
Edit: formatting

which OS does your notebook run?
Docker supports Linux, OSX and Windows as well, and you could choose to use cf container plugin (cf ic), docker or also ice client.
Here you could find Bluemix documentation related to container

Related

Detect Docker for Windows vs Docker Native inside of WSL2 VM

So I have a use case where I need to detect inside of a WSL2 VM whether the Docker setup is Docker for Windows w/ WSL integration vs Docker just running inside of the WSL VM (say installed directly via apt or dnf). The networking situation between these two use cases is different because with Docker for Windows WSL integration you cannot reach containers by their IP from the WSL VM. This poses some problems for some dev-tooling that we have and wasn't previously an issue with devs running on Linux-native machines but we've recently run into it now that some devs are using Windows machines with WSL and Docker for Windows.
Any thoughts on how I can do this? Look for specific env vars, mount points etc?
Looks like I can just stat /mnt/wsl/docker-desktop and see if that exists.

Can I run window and linux containers at the same time? Docker

I have a zendframework 2 website that need a linux OS, and the website use a search engine that run on windows OS (IIS). How to use docker to run the website and the search engine at the same time?
Iam new to docker, I will appreciate if someone can help with docker-compose.yml and Dockerfile.
Docker uses the kernel in the system that you are using on the host machine to run the container, so if you have a linux machine with docker installed you can only run images of containers that uses a linux kernerl.
So you can't have a windows container on a linux machine.
Also this can help

Unable to connect to running docker containers (minikube docker daemon)

When I run my docker container using Docker Desktop for Windows I am able to connect to it using
docker run -p 5051:5000 my_app
http://0.0.0.0:5051
However when I open another terminal and do this
minikube docker-env | Invoke-Expression
and build and run the same container using the same run command as above
I cannot connect to the running instance.
Should I be running and testing the containers using Docker Desktop, then using minikube to store the images only (for Kubernetes)? Or can you run them and test them as well through minikube?
That's because on your second attempt, the container is not running on the host but on the minikube VM. You'll be able to access it using the minikube VM IP.
To get the minikube ip you can run minikube ip
Why ?
Invoking minikube docker-env sets all the docker env variable on your host to match the minikube environment. This means that when you run a container after that, it is run with the docker daemon on the minikube VM.
I asked you if there are any specific reasons to use Docker Desktop and Minikube together on a single machine as these are two competitive solutions which basically enable you to perform similar tasks and achieve same goals.
This article nicely explains differences between these two tools.
Docker-for-windows uses Type-1 hypervisor, such as Hyper-V, which are
better compared to Type-2 hypervisors, such as VirtualBox, while
Minikube supports both hypervisors. Unfortunately, there are a couple
of limitations in which technology you are using, since you cannot
have Type-1 or Type-2 hypervisors running at the same time on your
machine
If you use Docker Desktop and Minikube at the same time I assume you're using Type-1 hypervisor, such as mentioned Hyper-V, but keep in mind that even if they use the same hypervisor, both tools create their own instances of virtual machine. Basically you are not supposed to use those two tools together expecting that they will work as a kind of hybrid that lets you manage single container environment.
First check what hypervisor you are using exactly. If you're using Hyper-V, simple Get-VM command in Powershell (more details in this article) should tell you what you currently have.
#mario no, I didn't know minikube had a docker daemon until recently
which is why I have both
Yes, Minikube has built in docker environment (in fact it sets everything up, but yes, it also sets up container runtime) so basically you don't need to install docker additionally, and as #Marc ABOUCHACRA already suggested in his answer, Minikube runs the whole environment (single node k8s cluster with docker runtime) on a separate VM. Linux version has an option --vm-driver=none which allows you to use your host container runtime and set-up k8s components on it, but this is not the case with Windows version - here you can only use one of two currently supported hypervisors: Hyper-V or VirtualBox (ref).
I wouldn't say that Docker Destkop runs everything on your host. It also uses Type-1 hypervisor to run the container runtime environment. Please check the Get-VM command on your computer and it should be clear what VMs you have and created by which tool.

How to run Google Datalab locally?

How do I run Datalab locally when it requires Docker (and Docker Toolbox is not supported as documented here: https://cloud.google.com/datalab/docs/quickstarts/quickstart-local)? The Docker website says Docker requires Windows 10 Professional or Enterprise 64-bit, and most corporate environments don't run Windows 10.
Docker is highly preferred over Docker Toolbox, as its a simpler, self-contained installation, with simpler configuration (since you don't have additional virtualization software to deal with, as you do with Docker Toolbox - namely boot2docker and its underlying functionality). However if you have a setup to run docker on your end, you should theoretically be able to use that for running the Datalab docker container by adapting the instructions.
You do have the option of running everything on a GCE VM.
I was facing the same problem, what I found more comfrotable in the end is to install Ubuntu on Virtual Box. This is free and fairly easy, and from the virtual machine you can use all the Docker and the Google guide to run Datalab locally.

Docker in virtualbox

I have a following scenario:
Windows 7 machine, with an ubuntu virtual machine through virtual box.
I want to know what are the best options for running docker inside the ubuntu?
Can I just install the docker to the ubuntu? Or should I use docker-machine?
The official specs left me confused by saying:
Machine is currently the only way to run Docker on Mac or Windows
So according to that, it would mean I do need the docker-machine, since my base system is Windows?
Why couldn't I just install docker to the virtual machine ubuntu, and use it directly there?
I believe you can but haven't tried this myself. The comment about Docker Machine is related to not being able to run Docker directly on the Windows OS. Docker Machine is spinning up a headless Virtualbox instance of boot2docker with a convenient cli to access it.

Resources