Windows based couchbase image for docker - docker

Is windows based image for "couchbase" available to install with docker? or any way around so that couchbase can be installed with docker in windows container.

The images are based always on Linux. You know an image is based on other image recursively till reach a base image like ubuntu, debian or whatever. Anyway, it is suppossed they are not related to the host O.S. They can be run on a Docker using a Windows host, Linux host or OSX host in the same way. On Windows or OSX you can install Docker to run container based on Linux images, there is no problem about that.
Depending of the use of the container, if it needs some hardware to be useful (like wireless cards or something like that), then the host is important because there are drivers and kernel directly involved. But usually, any image can be used to run containers independently of the Docker host.

As of today (2017-10-02), I don't think there is an official Couchbase Docker image for Windows container. Their Dockerfile shows that their images are built off of Ubuntu.
You can try setting everything up manually by following the steps below. (Note that installing via Chocolatey is just a convenience. You can choose another method.)
Get Windows Server Core image.
host> docker pull microsoft/windowsservercore
Start the container in interactive mode
host> docker run -it --name couchbase-on-windows microsoft/windowsservercore
Switch to PowerShell
container-cmd> PowerShell
Install Chocolatey
container-ps> Set-ExecutionPolicy Bypass; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Install Couchbase. (The version on chocolatey might be a bit behind the latest.)
container-ps> choco install couchbase-server-community
If all this works to your liking, then you can create a Dockerfile to make your own Docker image. You can see what this person did to create an image for Redis on Windows. Here's his Dockerfile.

Related

Are official docker images cross-platform compatible?

What I mean is if I can run for example the official docker image DEBIAN and on top of that
run the official docker image NGINX with both same supported architecture e.g. Linux x86-64?
Will it work like I would install NGINX package for DEBIAN operating systems in non-docker way?
Because I'm learning docker and I've came across that NGINX was build and run from official NGINX repository for DEBIAN OS on top of the official docker image DEBIAN?
Is that a clue that docker images are not cross-platform compatible?
I've also came across this helpful question.
If by cross-platform you mean whether a docker image built on an x86_64 machine will run on a ppcle64 machine, then the answer is no (there are ways around it by using an emulator, but generally speaking the answer is no).
If you mean, whether an Ubuntu container can be run on a Debian host, then yes (provided host kernel version is compatible, which it will be, since you were able to install docker).
As for the question of why NGINX official image is Debian, the developers might have their own reasons. In fact, the official repo has Alpine flavour image as well. You can modify the Dockerfile to use Ubuntu image, make the necessary modifications (such as the ubuntu version of the installer) and build it on a Debian host. It will produce an Ubuntu image which will run an Ubuntu container on any Linux, Unix, MacOS or Windows (using Linux VM) . You can build that Dockerfile as is on an Ubuntu host and it will create the same nginx:latest image as you would download from dockerhub. This can be verified using the checksum.

List images created by Docker for Mac using Docker Toolbox

From Docker's documentation, I read both Docker for Mac and the Docker Toolbox can coexist.
So I thought I could use these images created by Docker for Mac, but when I switched to Docker Toolbox, it turned out that I was wrong, because I entered docker images in Docker Quickstart Terminal.app and no image was listed.
Is there a way to achieve this?
Docker-for-Mac sets up a small virtual machine via hyperkit, which is a xhyve-based virtualization solution.
The quickstart terminal also sets up a small virtual machine, but it uses the docker-machine tool to create a virtualbox VM.
Both of these approaches are valid approaches to get a running Docker-in-a-vm-on-your-mac, but they are different VMs.
Similarly, if I have a regular linux machine at my desk, and I pull an image, you won't see that image in the docker daemon on the linux machine at your desk.
Both tools can coexist, but they don't share data.
You can't share images directly between Docker for Mac and Docker Toolbox. They are two different and independent systems.
In Docker for Mac, the docker daemon is running inside an Alpine linux vm controlled by a small hypervisor (Xhyve). In Docker Toolbox, the docker daemon runs inside a boot2docker vm controlled by VirtualBox.
You can't directly communicate between the two, but you can save the image using docker save (documentation here):
docker save image_from_dockertoolbox > toolbox.tar
and then use docker load (documentation) to load it after changing to docker4mac:
docker load < toolbox.tar.gz

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.

Using commands in bluemix user interface

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

Docker - Install CI Server on a remote host

I have a remote host that is already running a Ubuntu OS. I want to now create a docker file that would help me run a Continuous Integration server like TeamCity on this remote host.
I understand that I create a DockerFile from a base image like Ubuntu. But I do not need another Ubuntu filesystem on a Ubuntu host. How can I handle this situation?
If you need all the userspace files of Ubuntu, then this is how Docker operates - in order to promise that you can lift your container off an Ubuntu machine and run it on a different Linux, Docker has its own copy of everything above the kernel. This will be shared amongst every container based on Ubuntu, but still it's a couple of hundred megs of disk space.
If you don't need so much from Ubuntu, then you can start with a much smaller image such as busybox.
You could also create a fairly empty container image and map parts of your Ubuntu disk to be visible using the -v option. But then you won't have everything you need inside the container.

Resources