Is the Docker engine installed on the server or client? - docker

Is the Docker engine installed on the server to build off of the images it receives and then runs the containers that are built from it or is the engine installed on the client and then the building of images into containers is done there? Is the Docker engine installed on both the client and server and does different actions on each side?

Docker Engine is responsible for building, pulling, pushing the image and then running them as container. Docker Engine is installed on the server side and the client side just consist of the CLI used for issuing commands to Docker Engine. The Client uses Rest API to issue commands to server.
In your case both Machine A and Machine B will have Docker Engine. You will need the Docker Engine on Machine A to build the image and then push it to a repository (like Dockerhub). On Machine B you will need Docker Engine to pull the image and then create containers from it.

Related

Pull and push docker images without installed Docker

We need to transfer large number of docker images from Azure DevOps to private container registry (this registry does not have access to the Internet). For this matter there is proxy machine with Windows Server with Azure Cli and access to the Azure DevOps, but we are restricted with installing Docker there.
Is there a way to pull docker images from Azure DevOps and push them into another container registry without installed Docker? Perhaps there is slim version of Docker or some official script.
You can basically save it as an archive, and reload it the same way.

Deploy docker windows container from CI to Windows Server 2016

I'm trying to wrap my head around Docker containers, specifically how to deploy them to a Docker container host. I know there are lots of options here and ultimately we'll switch to a more common deployment approach (e.g. to Azure, AWS) but this is a temporary requirement. We're using windows containers.
I have a container image that I've created and will be recreated on each build as part of a Jenkins job (our Jenkins instance is hosted on a container-ready windows server 2016 box). I also have a separate container-ready Windows Server 2016 box which is where we intend to run the containers from.
However, I'm not sure how I can have the containers that our Jenkins box produces automatically pushed to our separate 2016 host. Ideally, I'd like to avoid using a container registry, unless there is a low-friction, on-premise option available.
Container registries are the way to distribute Docker images. Tooling is built around registries, it would be counterproductive to work against the concept.
But docker image save and docker image import could get you started as it saves the image as a tar file that you can transfer between the hosts. Once you copied the image to the other box, you can start it up with the usual docker run command, or docker compose up.
If your case is not trivial though and you start having multiple Docker hosts to run the containers, container orchestrators like Docker Swarm, Kubernetes are the way to go - or the managed versions of those, like Azure ACS. That rabbit hole is deeper though than I can answer in a single SO answer :)

How to build docker images on AWS EC2 Windows Server instance?

We use Team City to build C# applications on a Windows server in AWS EC2.
Now there is a requirement to build Docker containers using the same system. The build steps have been tested locally and are able to produce a docker image.
Docker is not installing correctly on the server which leads to the builds failing.
Docker Edge supports Windows Server but fails on EC2 due to Hyper-V not functioning correctly.
Docker Toolbox also fails because VT-X/AMD-v are not enabled.
Is there any way to build docker images on an AWS EC2 Windows Server instance?

How to deploy docker container to Cloud Foundry?

My application is comprised of two separate docker containers. One being a Grails based web application and second being a RESTful Python Flask application. Both docker containers are sitting on my local computer. They are not hosted on docker hub. They are proprietary and I don't want to host them publicly.
I would like to try Cloud Foundry to deploy these docker containers and see how it works. However, from the documentation I get a sense that Cloud Foundry doesn't support deploying docker containers sitting on a local machine.
Question
Is there a way to deploy docker containers sitting on a local computer to CloudFoundry? If not, what is a way to securely host the containers somewhere from CF can fetch them?
Is CloudFoundry capable of running a docker container that is a Python Flask application?
One option you have is to not use Docker images, and just push your code directly, one of the nice features of CF. PCF comes with a python buildpack which should automatically detect your Flask app.
Another option would be run your own trusted docker registry, push your images there, and then when you push your app, tell it to grab the images from your registry. If you google "cloud foundry docker registry" you get the following useful results you should check out:
https://github.com/cloudfoundry-community/docker-registry-boshrelease
http://docs.pivotal.io/pivotalcf/1-8/adminguide/docker.html#caveats
https://docs.pivotal.io/pivotalcf/1-7/opsguide/docker-registry.html

What is the Docker Engine?

When people talk about the 'Docker Engine' do they mean both the Client and the Daemon? Or is it something else entirely?
As I see it there is a Docker Client, a Docker Daemon. The Client runs locally and connects to the Daemon which does the actual running of the containers. The Client can connect to a remote Daemon. Are these both together the Engine? thanks
The Docker Engine is the Docker Daemon running on a single host, installed with the Docker Client CLI. Here are the docs that answer this specific question.
On top of that, you can have a Swarm running that joins multiple hosts to horizontally scale and provide fault tolerance. And there are numerous other projects from Docker, like their Registry, Docker Cloud, and Universal Control Plane, that are each separate from the engine.
Docker engine is a client-server application which comprises of 3 components.
1. Client: Docker CLI or the command line window that helps us to interact.
2. REST API: Client communicate with the server with REST API, the commands issued by the client is sent to the server in the form of REST API, it is this reason our server can either be in the local or remote machine.
3. Server: Server here is either the local or remote machine or host machine which has a daemon process running in it which receives the commands and creates, manages and destroys the docker objects like images, containers, volumes etc.

Resources