SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
DETAILS
OF RUNNING
AXIGEN ON
DOCKER
Details of Docker
Docker, an open source technology, is used primarily for developing /
shipping and running applications. Docker enables you to segregate the
applications from your underlying infrastructure so that the software delivery
is quicker than ever. Management of infrastructure is made simple and easy
via Docker, as it can be managed just the same way how we can manage
our own applications. Bringing in the advantages of Docker for shipping,
testing, deploying the code – we can significantly reduce the delay between
the development stages to hosting the same code on Production.
Axigen on Docker
────
Axigen Based Mail
Service on Docker
Architecture
────
Deploying
────
Running
────
BUSINESS SOFTWARES
& SOLUTIONS
64 Santoshpur Avenue D2
Kolkata 700075
+9133 24724013
www.bssit.net
The Docker Platform:
Docker provides the flexibility of packaging and running the application in a loosely coupled
environment that surpasses the hardware related boundaries called as a Container. The levels of
isolation and also the Docker security makes it possible to run many containers at the same time on a
host which is Docker enabled. Containers can be thought of as the Virtual Computers but with the
only difference of reduced OS. In other words, Containers are light weighted as they do not really need
to run on a hypervisor but can run directly on the Host machine’s Kernel. This also means that there
can be more containers on a given Docker enabled host than if it were to be using Virtual machines.
An irony here is that you can run Docker containers within hosts which are virtual machines itself!
Docker provides the required tooling and also a platform to manage the lifecycle of your Docker
containers:
We can develop applications and their supporting components using containers.
With the above, the container becomes the basic unit for distribution and also in testing application.
When the application is already, we can deploy your application into a production environment. This
can either be done as a container or as an orchestrated service. This works the same whether your
production environment is a local data
center, a cloud provider, or a hybrid of the
two.
The Docker Engine:
The Docker Engine is a client-server
application with the following major
components running as the internals of it
and they are:
A server that is long-running which is called
as a daemon process (the dockerd
command).
A REST API which specifies interfaces that programs can use to communicate with the daemon and
also be able to instruct it on what to do next.
A command-line interface (CLI) client (the docker command).
The CLI uses the Docker provided REST APIs to control or interact with the Docker daemon through
scripting or even the direct Docker CLI commands. Many of the other applications also use the
underlying APIs and also uses the CLI interface as well. The daemon manages the part of creating and
managing the Docker objects as like the Images, Containers, Networks and also the volumes.
Docker can be used for more than what we can actually think of, but to limit to the very useful
scenarios and the most used scenarios – let us take the very important ones to take a closer look into
it.
1. Fast, consistent delivery of your applications:
Docker enables and also streamlines the development lifecycle into a disciplined environment where
developers are allowed to work in these standardized environments with the use of local containers
that provide the applications and services. Docker Containers form the biggest usage for the
Continuous Integration and Continuous Development
workflows (CI / CD).
2. Consider the following example scenario:
Developers can concentrate on coding the modules
locally and then it can be shared over to their
colleagues using the Docker containers.
The developers can put Docker to use in pushing their
applications into a test like an environment and also
execute automated and manual regression tests.
Developers if they find bugs, they can put in their efforts in resolving them and then push the fix into
the same local environment and then test the fix for correct working as well.
Once the testing phase is completed, delivering the fix to the Customer is nothing difficult as it is just
going to be pushing the fix into the Production environment from the Test environment.
3. Responsive deployment and scaling:
Docker with its container-based platform makes it very easy and also allows highly portable
workloads. Docker containers have the flexibility running on a developer’s laptop, a physical machine,
a virtual machine, a virtual machine in a data center, on cloud providers, on-premise providers, or an
amalgam of all the mentioned environments until now. Dynamically managing the workloads is very
easy with the Docker’s portability and light weighted nature. It also makes it every easy to scale up or
to tear down applications and services, as and how the business dictates it to.
4. Running more workloads on the same hardware:
As discussed in the above sections that Docker is
lightweight, along with it, it is lightning fast as well. It
provides viable, cost-effective alternative to its
counterparts as like the hypervisor-based virtual
machines. This enables than you can consume more
on these resources and at the same time achieve the
business goals as well. It is very much recommended
for high-density environments and also for the
small/medium deployments where there is always
more to be done with fewer resources.
How does Docker work?
Docker as any other counterpart in this arena has a client-server architecture. Docker Daemon which
forms the server component can be held responsible for any of the actions that relate with containers.
The Docker daemon receives these commands from either the Docker client via the Command Line
Interface (CLI) or through the Docker REST APIs. Having said that the Docker client can reside on
the same host as that of Docker Daemon or it may be available on a totally different machine
altogether.
Images from the basic building blocks in the context of Docker and Containers are built from these
images. We can understand Images to be templates with the required configurations of applications
and then containers are just copies of these images. Images are always maintained and organized in a
layered manner. Each and every change in an image is added as a layer on top of it.
With the basic understanding of what Docker Images and Docker Containers are, let us now try to
understand what Docker registries are all about. Docker registry can be understood as a repository of
all Docker images. Using this super cool feature named Docker registry, we can build and share
images amongst peers and colleagues of your team. Docker registries can be either Public or Private as
well. If you Docker registry is public, then it means that all your images can be accessible by the
Docker hub users. Docker registry which is Private in nature is nothing less than GIT, we can build
images locally and commit it them to push it to Docker Hub.
A Docker Container can be understood as the actual execution environment for Docker as such. As
explained earlier, Docker containers are created out of Docker images. You can configure all the
required applications with the required configuration in a container and commit it to make a golden
image out of it. We can then build more containers from it as we like. Two or more containers may be
linked together to form a tiered application architecture, fulfilling business needs and requirements.
Docker containers can be started or stopped, committed or terminated altogether – but a point to
remember here is that if a docker container is terminated without being committed, all the changes
made to that specific Docker container will be lost forever.
Conclusion:
In this article, we have introduced the concepts of Docker and where this wonderful application finds
its usage. Docker provides containerization of services into secluded individual virtual machines
without really worrying about the OS and networking resources. We have also understood the usage,
architecture and the design of Docker. Hope this article was in detail for you to understand the
concepts pretty well.
RUNNING AXIGEN ON DOCKER
Introduction
The Axigen Docker image is provided for users to be able to run an Axigen based mail service within a Docker
container.
Image structure
The image relies on a Centos 7 (centos:7) image; on it, Axigen is installed (from RPM) and basic configuration is
performed.
The disk structure obeys the RPM defined structure:

/opt/axigen — binaries and other files

/var/opt/axigen — data files
The "/var/opt/axigen" is configured as a Docker volume and must be preserved between container runs, to
preserve the mail server data (configuration, mailbox data, etc.).
The following services are enabled and mapped as 'exposed' TCP ports in Docker:
 SMTP (25 - non secure, 465 - TLS)
 IMAP (143 - non secure, 993 - TLS)
 POP3 (110 - non secure, 995 - TLS)
 WEBMAIL (80 - non secure, 443 - TLS)
 WEBADMIN (9000 - non secure, 9443 - TLS)
 CLI (7000 - non secure)
Using the Axigen image / container
An important point is that the Axigen instance data is not the container itself (which holds just package
files — binaries and so on) but the "/var/opt/axigen" volume, which holds the actual server configuration and
the server (mailbox / users) data. A container may be deleted, upgraded (new container created from a newer
image), stopped, started, and the server data will be preserved, as long as the Docker volume which is mapped
upon container startup is preserved.
CREATING A NEW AXIGEN MAIL SERVER INSTANCE
The Axigen data volume may be mapped, upon container creation, to the Docker volume or to a host filesystem
path (bind mount). The latter approach is recommended, allowing the administrator to examine the Axigen data files
(storage, logs, configuration) directly from the Docker host.
# docker run --name=axigen -dt -v <volume>:/var/opt/axigen -p 443:443 -p 9443:9443 -p 993:993
-p 995:995 -p 25:25 -p 465:465 -p 9000:9000 -p 7000:7000 axigen/axigen
The following options are used:

-d → detach from the container (since we want it to run in the background)

-t → allocate a pseudo-TTY to allow capturing Axigen stdout in the Docker logs

-v → map a volume in /var/opt/axigen; <volume> may be a Docker volume or a local host path (bind
mount). See the The Axigen data volume section below for more details
 -p → port mapping: map the ports exposed by the container (Axigen, in this case) to host ports. In the
example above, ports 443 (WebMail), 9443 (WebAdmin), 993 (IMAPs) and 995 (POP3s), 25 (SMTP) and
465 (SMTPs) are mapped. The Axigen container also exposes other ports which may me mapped, if needed
(see the Image structure section).
When the Axigen data volume (be it a Docker volume or a bind mount) is first used in the container, it will be
initialized.
Upon creation, the container will also be started.
Check that the container is running:
# docker ps -f ancestor=axigen
The output should display a running container, along with the port mapping and other information:
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS
NAMES
03fa1abc15d2 axigen/axigen "/bin/sh -c /app/run…" 6 minutes ago Up 6
minutes 80/tcp, 110/tcp, 0.0.0.0:25->25/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:465-
>465/tcp, 0.0.0.0:993->993/tcp, 143/tcp, 0.0.0.0:995->995/tcp, 0.0.0.0:9000->9000/tcp,
0.0.0.0:9443->9443/tcp, 8443/tcp axigen
At this point, if the WebAdmin port was mapped (-p 9443:9443), the Axigen WebAdmin interface should be
accessible via the host IP: https://localhost:9443/. Since Axigen will only run in demo mode for a limited period
without an assigned license, please use the WebAdmin to upload your license file (free or commercial), before this
period expires. After the demo period expires, the container will no longer start, and the Axigen data volume will
need to be reinitialized (deleted and recreated).
The administrator password is set randomly upon the data volume initialization, and is available in the container logs
(note that you invoke the docker logscommand using the Container ID from the previous output; alternatively you
can invoke also with the container given name, see the --name parameter of the docker run command):
# docker logs 03fa1abc15d2
Initializing workdir
Administrator's password saved
Admin password is: L5NuNBVZXA6mr
Axigen[18]: INFO: Starting Axigen Mail Server version 10.1.4 (Linux/x64)
Axigen[18]: SUCCESS: supervise ready... (respawns per minute: 10)
Axigen[18]: INFO: supervise: spawning a new process to execute Axigen Mail Server version
10.1.4 (Linux/x64)
In the example above, the generated administrator password is L5NuNBVZXA6mr
STOPPING AND STARTING THE CONTAINER
A running Axigen container may be stopped by using the docker stop <container_id> command, where
the <container_id> is obtained from the output of the docker ps command. Axigen containers (including stopped
ones) may be viewed with the docker ps -a -f ancestor=axigen command. When a container is stopped, its
full state is preserved, only the Axigen process is stopped.
A stopped Axigen container may be started by using the docker start <container_id> command.
UPDATING AN AXIGEN IMAGE TO THE LATEST VERSION AVAILABLE
Use the following command to update your local axigen/axigen image to the latest version:
work_macbook:axigen_data user$ docker pull axigen/axigen
Using default tag: latest
latest: Pulling from axigen/axigen
af4b0a2388c6: Already exists
f7670ac967c0: Already exists
0ac75bc5506e: Pull complete
6c9808647fc6: Pull complete
8c563906b2d1: Pull complete
93ca44a4ef4f: Pull complete
9116a082e08b: Pull complete
b961a44e6e82: Pull complete
34caaa3f2d4f: Pull complete
ba4a6f28b6ed: Pull complete
b10af91db8f9: Pull complete
01309461c6d5: Pull complete
Digest: sha256:1cebda79647fc86db7ec26f0087d864ff01700ef6aa4265f80452d436d659d53
Status: Downloaded newer image for axigen/axigen:latest
work_macbook:axigen_data user$
After an image is updated, you will need to recreate the axigen instance with an existing axigen data volume as
described below.
DELETING A CONTAINER
The administrator may delete an Axigen container (without deleting the actual data — configuration and domains,
which is stored in the Axigen data volume).
A stopped Axigen container may be deleted by using the docker rm <container_id> command. Please note that
only stopped containers may be deleted.
Along with the container, all data which is not Axigen data volume (e.g. shell history, system logs) will be lost.
RECREATING AN AXIGEN INSTANCE WITH AN EXISTING AXIGEN DATA VOLUME
If the Axigen data volume was preserved, a new container may be created using the same volume; the admin
password, configuration and domain data will be preserved. The same command as for the initial instance creation
is used, but providing an existing, populated Axigen data volume as the fist parameter in the -vmapping.
docker run --name=axigen -dt -v <volume>:/var/opt/axigen -p 443:443 -p 9443:9443 -p 993:993 -
p 995:995 -p 25:25 -p 465:465 -p 9000:9000 -p 7000:7000 axigen/axigen
This method is also used for the following purposes:
 Upgrading to a newer version of Axigen
 Recreating the container ↔ host port mapping
THE AXIGEN DATA VOLUME
Using a host filesystem path (bind mount)
A directory on the host must be created. If selinux (for Linux hosts) is used,
the folder must be labeled with the svirt_sandbox_file_t selinux label.
Example:
mkdir /var/axigen_var
chcon -t svirt_sandbox_file_t /var/axigen_var
This way, the administrator may access files from the axigen var partition (logs, configurations) without accessing
the Docker container itself.
Important Note
Since Axigen is accessing (reading / writing) files in the data volume, it is
imperative that the administrator does not modify files in the mapped host
folder, as this action may have unpredictable results.
More information about Docker bind mounts here: https://docs.docker.com/storage/bind-mounts/
Using a Docker volume
A persistent Docker volume may be used. If it does not exist, it will be automatically created on the container
instantiation.
More information about Docker volumes here: https://docs.docker.com/storage/volumes/

Contenu connexe

Tendances

24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian
24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian
24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septianIAESIJEECS
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekwiTTyMinds1
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioJérôme Petazzoni
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosMike Martin
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainAjeet Singh Raina
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Edureka!
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...Andrea Fontana
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Simon Storm
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesSteven Grzbielok
 
An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...Conference Papers
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to AdvanceParas Jain
 

Tendances (20)

24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian
24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian
24 23 jun17 2may17 16231 ijeecs latest_version (1) edit septian
 
Dockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to GeekDockers & kubernetes detailed - Beginners to Geek
Dockers & kubernetes detailed - Beginners to Geek
 
Overview of Docker
Overview of DockerOverview of Docker
Overview of Docker
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
Introduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker CaptainIntroduction to Docker Containers - Docker Captain
Introduction to Docker Containers - Docker Captain
 
Hack the whale
Hack the whaleHack the whale
Hack the whale
 
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...
 
Docker tutorial
Docker tutorialDocker tutorial
Docker tutorial
 
Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14Docker dev ops for cd meetup 12-14
Docker dev ops for cd meetup 12-14
 
Containerization
ContainerizationContainerization
Containerization
 
Let's dockerize
Let's dockerizeLet's dockerize
Let's dockerize
 
Discussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machinesDiscussing the difference between docker dontainers and virtual machines
Discussing the difference between docker dontainers and virtual machines
 
Docker
DockerDocker
Docker
 
An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...An operational view into docker registry with scalability, access control and...
An operational view into docker registry with scalability, access control and...
 
Docker Basic to Advance
Docker Basic to AdvanceDocker Basic to Advance
Docker Basic to Advance
 
paper
paperpaper
paper
 
Docker intro
Docker introDocker intro
Docker intro
 

Similaire à Axigen on docker

Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction GuideMohammed Fazuluddin
 
What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?Mars Devs
 
Docker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryDocker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryAnimesh Singh
 
Introduction to Dockers.pptx
Introduction to Dockers.pptxIntroduction to Dockers.pptx
Introduction to Dockers.pptxHassanRaza40719
 
Docker Use Cases.pdf
Docker Use Cases.pdfDocker Use Cases.pdf
Docker Use Cases.pdfSimform
 
Docker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdfDocker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdfRifqiMultazamOfficia
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixIBM
 
Docker interview Questions-2.pdf
Docker interview Questions-2.pdfDocker interview Questions-2.pdf
Docker interview Questions-2.pdfYogeshwaran R
 
Powering Microservices with Docker
Powering Microservices with DockerPowering Microservices with Docker
Powering Microservices with DockerCognizant
 
Docker and containerization
Docker and containerizationDocker and containerization
Docker and containerizationAmulya Saxena
 
Backend Master | 3.4.2 Deploy - Docker Introduction
Backend Master | 3.4.2 Deploy - Docker IntroductionBackend Master | 3.4.2 Deploy - Docker Introduction
Backend Master | 3.4.2 Deploy - Docker IntroductionKyunghun Jeon
 
Docker - Alem da virtualizaćão Tradicional
Docker - Alem da virtualizaćão Tradicional Docker - Alem da virtualizaćão Tradicional
Docker - Alem da virtualizaćão Tradicional Marcos Vieira
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 

Similaire à Axigen on docker (20)

Docker - A Quick Introduction Guide
Docker - A Quick Introduction GuideDocker - A Quick Introduction Guide
Docker - A Quick Introduction Guide
 
What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?What is Docker & Why is it Getting Popular?
What is Docker & Why is it Getting Popular?
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
Docker OpenStack Cloud Foundry
Docker OpenStack Cloud FoundryDocker OpenStack Cloud Foundry
Docker OpenStack Cloud Foundry
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
What is Docker?
What is Docker?What is Docker?
What is Docker?
 
Introduction to Dockers.pptx
Introduction to Dockers.pptxIntroduction to Dockers.pptx
Introduction to Dockers.pptx
 
Docker Use Cases.pdf
Docker Use Cases.pdfDocker Use Cases.pdf
Docker Use Cases.pdf
 
Docker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdfDocker_Interview_Questions__Answers.pdf
Docker_Interview_Questions__Answers.pdf
 
Docker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & BluemixDocker, Cloud Foundry, Bosh & Bluemix
Docker, Cloud Foundry, Bosh & Bluemix
 
Docker In Cloud
Docker In CloudDocker In Cloud
Docker In Cloud
 
Docker interview Questions-2.pdf
Docker interview Questions-2.pdfDocker interview Questions-2.pdf
Docker interview Questions-2.pdf
 
Dockerizing mule soft esb
Dockerizing mule soft esbDockerizing mule soft esb
Dockerizing mule soft esb
 
Powering Microservices with Docker
Powering Microservices with DockerPowering Microservices with Docker
Powering Microservices with Docker
 
Docker and containerization
Docker and containerizationDocker and containerization
Docker and containerization
 
Docker containers intro
Docker containers introDocker containers intro
Docker containers intro
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Backend Master | 3.4.2 Deploy - Docker Introduction
Backend Master | 3.4.2 Deploy - Docker IntroductionBackend Master | 3.4.2 Deploy - Docker Introduction
Backend Master | 3.4.2 Deploy - Docker Introduction
 
Docker - Alem da virtualizaćão Tradicional
Docker - Alem da virtualizaćão Tradicional Docker - Alem da virtualizaćão Tradicional
Docker - Alem da virtualizaćão Tradicional
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 

Dernier

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Dernier (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Axigen on docker

  • 1. DETAILS OF RUNNING AXIGEN ON DOCKER Details of Docker Docker, an open source technology, is used primarily for developing / shipping and running applications. Docker enables you to segregate the applications from your underlying infrastructure so that the software delivery is quicker than ever. Management of infrastructure is made simple and easy via Docker, as it can be managed just the same way how we can manage our own applications. Bringing in the advantages of Docker for shipping, testing, deploying the code – we can significantly reduce the delay between the development stages to hosting the same code on Production. Axigen on Docker ──── Axigen Based Mail Service on Docker Architecture ──── Deploying ──── Running ──── BUSINESS SOFTWARES & SOLUTIONS 64 Santoshpur Avenue D2 Kolkata 700075 +9133 24724013 www.bssit.net
  • 2. The Docker Platform: Docker provides the flexibility of packaging and running the application in a loosely coupled environment that surpasses the hardware related boundaries called as a Container. The levels of isolation and also the Docker security makes it possible to run many containers at the same time on a host which is Docker enabled. Containers can be thought of as the Virtual Computers but with the only difference of reduced OS. In other words, Containers are light weighted as they do not really need to run on a hypervisor but can run directly on the Host machine’s Kernel. This also means that there can be more containers on a given Docker enabled host than if it were to be using Virtual machines. An irony here is that you can run Docker containers within hosts which are virtual machines itself! Docker provides the required tooling and also a platform to manage the lifecycle of your Docker containers: We can develop applications and their supporting components using containers. With the above, the container becomes the basic unit for distribution and also in testing application. When the application is already, we can deploy your application into a production environment. This can either be done as a container or as an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two. The Docker Engine: The Docker Engine is a client-server application with the following major components running as the internals of it and they are: A server that is long-running which is called as a daemon process (the dockerd command).
  • 3. A REST API which specifies interfaces that programs can use to communicate with the daemon and also be able to instruct it on what to do next. A command-line interface (CLI) client (the docker command). The CLI uses the Docker provided REST APIs to control or interact with the Docker daemon through scripting or even the direct Docker CLI commands. Many of the other applications also use the underlying APIs and also uses the CLI interface as well. The daemon manages the part of creating and managing the Docker objects as like the Images, Containers, Networks and also the volumes. Docker can be used for more than what we can actually think of, but to limit to the very useful scenarios and the most used scenarios – let us take the very important ones to take a closer look into it. 1. Fast, consistent delivery of your applications: Docker enables and also streamlines the development lifecycle into a disciplined environment where developers are allowed to work in these standardized environments with the use of local containers that provide the applications and services. Docker Containers form the biggest usage for the Continuous Integration and Continuous Development workflows (CI / CD). 2. Consider the following example scenario: Developers can concentrate on coding the modules locally and then it can be shared over to their colleagues using the Docker containers. The developers can put Docker to use in pushing their applications into a test like an environment and also execute automated and manual regression tests.
  • 4. Developers if they find bugs, they can put in their efforts in resolving them and then push the fix into the same local environment and then test the fix for correct working as well. Once the testing phase is completed, delivering the fix to the Customer is nothing difficult as it is just going to be pushing the fix into the Production environment from the Test environment. 3. Responsive deployment and scaling: Docker with its container-based platform makes it very easy and also allows highly portable workloads. Docker containers have the flexibility running on a developer’s laptop, a physical machine, a virtual machine, a virtual machine in a data center, on cloud providers, on-premise providers, or an amalgam of all the mentioned environments until now. Dynamically managing the workloads is very easy with the Docker’s portability and light weighted nature. It also makes it every easy to scale up or to tear down applications and services, as and how the business dictates it to. 4. Running more workloads on the same hardware: As discussed in the above sections that Docker is lightweight, along with it, it is lightning fast as well. It provides viable, cost-effective alternative to its counterparts as like the hypervisor-based virtual machines. This enables than you can consume more on these resources and at the same time achieve the business goals as well. It is very much recommended for high-density environments and also for the small/medium deployments where there is always more to be done with fewer resources. How does Docker work? Docker as any other counterpart in this arena has a client-server architecture. Docker Daemon which forms the server component can be held responsible for any of the actions that relate with containers. The Docker daemon receives these commands from either the Docker client via the Command Line Interface (CLI) or through the Docker REST APIs. Having said that the Docker client can reside on the same host as that of Docker Daemon or it may be available on a totally different machine altogether. Images from the basic building blocks in the context of Docker and Containers are built from these images. We can understand Images to be templates with the required configurations of applications and then containers are just copies of these images. Images are always maintained and organized in a layered manner. Each and every change in an image is added as a layer on top of it.
  • 5. With the basic understanding of what Docker Images and Docker Containers are, let us now try to understand what Docker registries are all about. Docker registry can be understood as a repository of all Docker images. Using this super cool feature named Docker registry, we can build and share images amongst peers and colleagues of your team. Docker registries can be either Public or Private as well. If you Docker registry is public, then it means that all your images can be accessible by the Docker hub users. Docker registry which is Private in nature is nothing less than GIT, we can build images locally and commit it them to push it to Docker Hub. A Docker Container can be understood as the actual execution environment for Docker as such. As explained earlier, Docker containers are created out of Docker images. You can configure all the required applications with the required configuration in a container and commit it to make a golden image out of it. We can then build more containers from it as we like. Two or more containers may be linked together to form a tiered application architecture, fulfilling business needs and requirements. Docker containers can be started or stopped, committed or terminated altogether – but a point to remember here is that if a docker container is terminated without being committed, all the changes made to that specific Docker container will be lost forever.
  • 6. Conclusion: In this article, we have introduced the concepts of Docker and where this wonderful application finds its usage. Docker provides containerization of services into secluded individual virtual machines without really worrying about the OS and networking resources. We have also understood the usage, architecture and the design of Docker. Hope this article was in detail for you to understand the concepts pretty well. RUNNING AXIGEN ON DOCKER Introduction The Axigen Docker image is provided for users to be able to run an Axigen based mail service within a Docker container. Image structure The image relies on a Centos 7 (centos:7) image; on it, Axigen is installed (from RPM) and basic configuration is performed. The disk structure obeys the RPM defined structure:  /opt/axigen — binaries and other files  /var/opt/axigen — data files The "/var/opt/axigen" is configured as a Docker volume and must be preserved between container runs, to preserve the mail server data (configuration, mailbox data, etc.). The following services are enabled and mapped as 'exposed' TCP ports in Docker:  SMTP (25 - non secure, 465 - TLS)  IMAP (143 - non secure, 993 - TLS)  POP3 (110 - non secure, 995 - TLS)  WEBMAIL (80 - non secure, 443 - TLS)  WEBADMIN (9000 - non secure, 9443 - TLS)  CLI (7000 - non secure)
  • 7. Using the Axigen image / container An important point is that the Axigen instance data is not the container itself (which holds just package files — binaries and so on) but the "/var/opt/axigen" volume, which holds the actual server configuration and the server (mailbox / users) data. A container may be deleted, upgraded (new container created from a newer image), stopped, started, and the server data will be preserved, as long as the Docker volume which is mapped upon container startup is preserved. CREATING A NEW AXIGEN MAIL SERVER INSTANCE The Axigen data volume may be mapped, upon container creation, to the Docker volume or to a host filesystem path (bind mount). The latter approach is recommended, allowing the administrator to examine the Axigen data files (storage, logs, configuration) directly from the Docker host. # docker run --name=axigen -dt -v <volume>:/var/opt/axigen -p 443:443 -p 9443:9443 -p 993:993 -p 995:995 -p 25:25 -p 465:465 -p 9000:9000 -p 7000:7000 axigen/axigen The following options are used:  -d → detach from the container (since we want it to run in the background)  -t → allocate a pseudo-TTY to allow capturing Axigen stdout in the Docker logs  -v → map a volume in /var/opt/axigen; <volume> may be a Docker volume or a local host path (bind mount). See the The Axigen data volume section below for more details  -p → port mapping: map the ports exposed by the container (Axigen, in this case) to host ports. In the example above, ports 443 (WebMail), 9443 (WebAdmin), 993 (IMAPs) and 995 (POP3s), 25 (SMTP) and 465 (SMTPs) are mapped. The Axigen container also exposes other ports which may me mapped, if needed (see the Image structure section). When the Axigen data volume (be it a Docker volume or a bind mount) is first used in the container, it will be initialized. Upon creation, the container will also be started. Check that the container is running: # docker ps -f ancestor=axigen
  • 8. The output should display a running container, along with the port mapping and other information: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 03fa1abc15d2 axigen/axigen "/bin/sh -c /app/run…" 6 minutes ago Up 6 minutes 80/tcp, 110/tcp, 0.0.0.0:25->25/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:465- >465/tcp, 0.0.0.0:993->993/tcp, 143/tcp, 0.0.0.0:995->995/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:9443->9443/tcp, 8443/tcp axigen At this point, if the WebAdmin port was mapped (-p 9443:9443), the Axigen WebAdmin interface should be accessible via the host IP: https://localhost:9443/. Since Axigen will only run in demo mode for a limited period without an assigned license, please use the WebAdmin to upload your license file (free or commercial), before this period expires. After the demo period expires, the container will no longer start, and the Axigen data volume will need to be reinitialized (deleted and recreated). The administrator password is set randomly upon the data volume initialization, and is available in the container logs (note that you invoke the docker logscommand using the Container ID from the previous output; alternatively you can invoke also with the container given name, see the --name parameter of the docker run command): # docker logs 03fa1abc15d2 Initializing workdir Administrator's password saved Admin password is: L5NuNBVZXA6mr Axigen[18]: INFO: Starting Axigen Mail Server version 10.1.4 (Linux/x64) Axigen[18]: SUCCESS: supervise ready... (respawns per minute: 10) Axigen[18]: INFO: supervise: spawning a new process to execute Axigen Mail Server version 10.1.4 (Linux/x64) In the example above, the generated administrator password is L5NuNBVZXA6mr STOPPING AND STARTING THE CONTAINER A running Axigen container may be stopped by using the docker stop <container_id> command, where the <container_id> is obtained from the output of the docker ps command. Axigen containers (including stopped ones) may be viewed with the docker ps -a -f ancestor=axigen command. When a container is stopped, its full state is preserved, only the Axigen process is stopped. A stopped Axigen container may be started by using the docker start <container_id> command. UPDATING AN AXIGEN IMAGE TO THE LATEST VERSION AVAILABLE Use the following command to update your local axigen/axigen image to the latest version: work_macbook:axigen_data user$ docker pull axigen/axigen
  • 9. Using default tag: latest latest: Pulling from axigen/axigen af4b0a2388c6: Already exists f7670ac967c0: Already exists 0ac75bc5506e: Pull complete 6c9808647fc6: Pull complete 8c563906b2d1: Pull complete 93ca44a4ef4f: Pull complete 9116a082e08b: Pull complete b961a44e6e82: Pull complete 34caaa3f2d4f: Pull complete ba4a6f28b6ed: Pull complete b10af91db8f9: Pull complete 01309461c6d5: Pull complete Digest: sha256:1cebda79647fc86db7ec26f0087d864ff01700ef6aa4265f80452d436d659d53 Status: Downloaded newer image for axigen/axigen:latest work_macbook:axigen_data user$ After an image is updated, you will need to recreate the axigen instance with an existing axigen data volume as described below. DELETING A CONTAINER The administrator may delete an Axigen container (without deleting the actual data — configuration and domains, which is stored in the Axigen data volume). A stopped Axigen container may be deleted by using the docker rm <container_id> command. Please note that only stopped containers may be deleted. Along with the container, all data which is not Axigen data volume (e.g. shell history, system logs) will be lost. RECREATING AN AXIGEN INSTANCE WITH AN EXISTING AXIGEN DATA VOLUME If the Axigen data volume was preserved, a new container may be created using the same volume; the admin password, configuration and domain data will be preserved. The same command as for the initial instance creation is used, but providing an existing, populated Axigen data volume as the fist parameter in the -vmapping.
  • 10. docker run --name=axigen -dt -v <volume>:/var/opt/axigen -p 443:443 -p 9443:9443 -p 993:993 - p 995:995 -p 25:25 -p 465:465 -p 9000:9000 -p 7000:7000 axigen/axigen This method is also used for the following purposes:  Upgrading to a newer version of Axigen  Recreating the container ↔ host port mapping THE AXIGEN DATA VOLUME Using a host filesystem path (bind mount) A directory on the host must be created. If selinux (for Linux hosts) is used, the folder must be labeled with the svirt_sandbox_file_t selinux label. Example: mkdir /var/axigen_var chcon -t svirt_sandbox_file_t /var/axigen_var This way, the administrator may access files from the axigen var partition (logs, configurations) without accessing the Docker container itself. Important Note Since Axigen is accessing (reading / writing) files in the data volume, it is imperative that the administrator does not modify files in the mapped host folder, as this action may have unpredictable results. More information about Docker bind mounts here: https://docs.docker.com/storage/bind-mounts/ Using a Docker volume A persistent Docker volume may be used. If it does not exist, it will be automatically created on the container instantiation. More information about Docker volumes here: https://docs.docker.com/storage/volumes/