I am unable to run linux containers as I run Docker in my development vm which has visual studio installed and I have not been ablt to get it working yet as it is an unsupported scenario and many of the google solutions have unfortunately not resolved it for me.
However, I was thinking that maybe I could keep Docker Desktop running on my dev vm (so that VS would be happy it was still "local") but actually have the Docker engine/daemon bit running on a remote host where linux containers actually work - is it possible to repoint Docker Desktop for Windows to a Docker engine on a remote host?
Apologies if my terminology is rubbish, I am new to Docker. Also, I have done some searching and have seen articles and messages talking about docker machine and DOCKER_HOST environment variables, but I cannot see anything yet that applies to Docker Desktop (e.g. I don't have that env variable set on my docker windows vm so maybe it doesn't use that mechanism).
Thanks in advance
Related
I would like to build an application as an executable that anyone could start without any requirements and without GUI.
Do you know if we can bundle a Docker image as an executable app for Mac OS or Windows (and Android/iOS) ?
Another way to phrase it, can we run docker images without docker installed ? can we bundle a docker image and docker inside an app and when executed it starts a docker container with the embedded docker ?
Docker is just a set of linux features (windows containers use similar windows features), so as long as you pack what ever you need to set everything just like docker (or any other container runtime like podman) does for you it will probably work. Just notice if using a docker image you'd need to unpack its files and do everything the docker engine and CLI are doing for you.
It depends on the application type but you could use a PWA which runs as a native desktop application on computers and smartphones and has similar functionality while using general purpose web frameworks like React, Angular or Vue.
If you want to run an executable regardless of the operating system or architechture docker's your best bet, and if being light weight and daemonless is your thing consider using podman as your application dependency and running your application
with it or its likes
I'm using Azure DevOps, and have a Linux build pipeline (ubuntu-16.04) setup that builds the code, starts containers with Docker Compose, then runs integration tests using the containers. This all works great.
Now I want to setup a Windows build pipline that does the same thing. However, with both the windows-2019 and win-1803 images, when I do docker stack up, I get this error message:
image operating system "linux" cannot be used on this platform
So, I guess Docker is installed in Windows mode, and thought to switch it to Linux containers using:
DockerCli.exe" -SwitchLinuxEngine
or
"%ProgramFiles%\Docker\Docker\DockerCli.exe" -SwitchLinuxEngine
However, the DockerCli.exe executable doesn't seem to be installed at all.
The only 2 things I can think of are:
Setup a self-hosted build agent
Somehow start the required containers somewhere else
But both of these will be a lot of work to setup, which I really don't need, neither do I want the running costs, or the job of maintaining it.
Are there any workarounds to run Linux containers on hosted Windows build agents?
Run Linux containers in an Azure DevOps Windows hosted build agent
Firstly, see the images listed which installed on Windows hosted agent: Docker images in Windows hosted agent. Docker EE on Server does not support Linux containers at all. So, it is impossible to build Linux docker image on Hosted Win-1803 agent. It can only build Windows docker image.
Until now, the only two workarounds is using self-hosted agent which based on Windows machine, or run a build which has two separate agent jobs(Pass the build artifacts back and forth between one agent job which run on Hosted Linux agent and the other is running on Hosted Windows agent) .
But since these two workarounds are all not convenient for you, there will not any other work around can achieve what you want.
In addition, there has a such suggestion feature raised on our official forum: Support for Docker with Linux Containers on Windows (LCOW) on hosted agent pool . You could vote and comment there, our Product Group team will review these suggestions regularly and consider taking it as Developer Roadmap. If this feature can be true, I think it will be very convenient to build Linux Container and without considering about which agent can only support.
I just started messing with containers and managing them. Then I came across with Kubernetes. I've already installed Docker and tried out a few examples. But when it came to managing them with Kubernetes, I've kinda stuck.
I've found out that I can run Kubernetes with minikube on Windows on my laptop for development. But I want to know if I can run Kubernetes on my production server or local development environment because as they point out minikube doesn't have all featues that Kubernetes can offer. So in production I guess I can't use minikube, right?
Because of the data that I'm using I can't use Google cloud or Azure for production, laws forbid that. So in short do I have to switch to cloud to use Kubernetes or can I use it in my Windows Server machine without any cloud environment?
I've already read How to do local development with Kubernetes? question but they've also recommended minikube.
Thanks for your answers.
So in production I guess I can't use minikube, right?
Not really advisable, minikube is ment to support learning/local single machine dev tasks.
do I have to switch to cloud to use Kubernetes or can I use it in my Windows Server machine without any cloud environment?
IMHO Windows and kubernetes are not really there yet. If you don't want to install dedicated linux box or switch to cloud there is always option to run it from within virtualized environment (VirtualBox, VMWare...). Maybe not super optimal performance-wise (additional layers of virtualization added on top of windows) but can be sufficiently stable for production (depends on available hardware and resources requirements).
I have a hard time finding information about this. Somewhere I've seen news that Docker has now natively been integrated to Windows. So apparently this means they are not "Linux container" but some kind of "Windows containers"? Does anyone have more information on this?
There has been a significant update thanks to many Docker acquisitions, such as Unikernel. Now it is possible to install beta (as of April '16) of Windows program running Docker without any hassle.
Faster and more reliable: no more VirtualBox! The Docker engine is running in an Alpine Linux distribution on top of an xhyve Virtual Machine on Mac OS X or on a Hyper-V VM on Windows, and that VM is managed by the Docker application.
UPDATE (September '17)
Full native support available here.
An integrated, easy-to-deploy development environment for building, debugging and testing Docker apps on a Windows PC. Docker for Windows is a native Windows app deeply integrated with Hyper-V virtualization, networking and file system, making it the fastest and most reliable Docker environment for Windows.
Microsoft has added containerization primitives to the Windows kernel and are helping porting Docker Engine to Windows. That means you can run native Windows containers with Docker on Windows Server 2016. It's been in tech preview for a while and is free to try. Details here: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/manage_docker?f=255&MSPPError=-2147217396
I have read this:
https://azure.microsoft.com/blog/2015/04/16/docker-client-for-windows-is-now-available/
As you can read there is only interface to manage docker containers inside Linux so far.
Currently (October 2016) there're a mess here.
Windows Server 2016 and Windows 10 build 1607 (Anniversary Update) support Docker containers natively. Obviously only with Windows as base images. Moreover only with Windows Server 2016 (Nano or Core).
But there's also Docker for Windows - which is the only suggested option on https://www.docker.com/products/docker#/windows. It's easily can be thought that that Docker is the one which runs natively on Windows. But it isn't!
Docker for Windows uses a VM with Linux to host all containers. So you can't pull Windows images.
So a try to pull an image will fail with "unknown blog" error:
C:\>docker pull microsoft/nanoserver
Using default tag: latest
latest: Pulling from microsoft/nanoserver
5496abde368a: Retrying in 1 second
94b4ce7ac4c7: Downloading
unknown blob
So Docker for Windows can be used only for Linux images!
How f... it's obvious, right?
For "real native Docker" (to run Windows container) we currently have download and install it manually as described in this manual - https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/quick_start_windows_10
I've been playing around with Docker in the past few weeks and currently I'm trying to set up a project.
I'm running a Raspberry Pi with Docker installed. I want to set up a container and use RDP to connect to a remote host.
I have tried working with Xorg (LXDE) and tried starting my graphical environment with startx but that doesn't seem to work. After some googling I found out that you cannot run startx on a virtualized device since startx will look after the graphics card and a virtual machine does not have that.
In order for my RDP to work I need a GUI that runs in a Docker container and uses the ARM architecture.
Has anyone else had any experience with this?
All help is appreciated!
Thanks
Vincentvo
Adding --privileged to my docker run command fixed my issue.
Just curious, but are you 100% tied to RDP? If you use VNC, you could just use the ubuntu ARM distro and then VNC into it. IF you are using a windows machine, superVNC should work for you.
There are even VNC clients for android. Come to think of it, you might be able to use Chrome RDP as well, havent tried that though.