Bundle Docker image as an executable application for major platforms / Can we run docker images without docker? - windows

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

Related

Can I run .Net Framework GUI Windows application inside a docker container?

I have a zip file of the Windows application which has a .exe file in it. I am trying to run this application inside a Docker container which should open up a GUI application when called. I tried using linux and Mono but didn't help much. Is there a way I can run a GUI based windows application on Docker container?
Thanks in advance!

Can Gitlab-CI runner work with MacOSx and docker to publish in app store?

I am thinking to host a MacOSX device for building and distributing the application in the Mac Application Store.
I would prefer to run the gitlab-runner instance using a docker container, and if possible, deploy it with marathon by distance.
Is that even possible?
Last time I built native apps you needed native OS X for using the necessary tools like app signing and such. Building in a docker container is not native OS X, so that would not be possible, and Marathon is then also out of the question.
But..using a GitLab runner with the Shell executor on Mac OS should work! You can run all Mac tools (if they don't need an interactive window)
If you are using hybrid apps (React Native for instance https://github.com/ptmt/react-native-macos) you can build apps for 90% anywhere, but it becomes tricky when you need to sign stuff again.. But here are services like http://www.macincloud.com where you rent a Mac for a while!

Run Linux containers in an Azure DevOps Windows hosted build agent

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.

Can Docker Desktop for Windows Point To Remote Docker Engine?

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

Docker ubuntu image with web server installed explicitly vs docker web server image?

What is the difference between Docker os image with web server installed with a web server and Docker webserver image ?
For eg Docker image of Ubuntu-16.04 running as container with NginX installed and other container running Nginx as Nginx Docker image?
Whose Performance will be better and stable ?
Usually a container with nginx runs in alpine os . a very lightweight os. While in the other hand you have ubuntu os and nginx.
So , the difference? ... the OS.
If you have good Docker/Unix/shell-scripting skills, a continuous-integration (CI) system, and the willingness to do ongoing maintenance, you might prefer building your own images. You will be in control of the exact version of the software used, and any build options or extensions required, and you will control when it gets security patches. But, this is a harder path to get started with, and if you don't periodically update your custom images they'll never get any sort of bug fixes or security patches at all.
If you're new to this space, you might prefer standard Docker Hub images. They're pre-packaged, usually have "enough" customization options, and are generally fairly good quality. But, if you need some extra customization, you might wind up needing to build a custom image anyways. I've also run into a situation where I've pinned an image to a specific upstream version image:1.2.3, and noticed several months later that image:1.2.7 is out, and the six-month-old Docker Hub image hasn't gotten a critical security fix because it's not getting built any more.
If none of this especially concerns you (and if you don't have a DevOps team at your disposal), I'd suggest just using the prebuilt nginx image and focusing on building and deploying your actual application.

Resources