I wrote an introduction about how does use with docker (is very simple), I hope you like :)!!
"Docker is an open platform for developing, shipping, and running applications" -- Docker docs
Is technology for encapsulating application. All applications when running with docker have the own environment and isolate another app running over the same operating system.
You can develop an application, they create Dockerfile with all dependencies and step for the run, then you should test docker in localhost and validate for deploy.
List of validations before deploy:
- The behavior of the app is correct?
- Request and Response it's fine (maybe unit testing)?
- The image is secure for production (validate with the author or check with your own skills)?
- Just have only necessary dependencies (production mode)?
When all validations pass, you must push all code to Git repository and run the Pipeline for deploy.
Actually have many options for deploy Docker, but principally, we can split this into two categories:
- Pipeline CI/CD
- Docker Cluster
If you want to make the build, test and deploy with your own hands... but I don't recommend this method (Shell Scripting)
It is a toolchain of jobs for build, test, upload to docker registry and deploy to cluster.
The main options are:
I prefer the Gitlab.
The cluster is a manager of Docker applications and its responsible for stay running, deploy all services, and more.
The main docker cluster for developing (non-production) is Minikube
With that, you know de main concepts and stages for work with docker.
- Make Dockerfile
- Push to Git (never forget)
- Run Pipeline
- Deploy to docker cluster
Perfect :)! your app is running in high availability, with the best practices for deploy. Don't forget to do implement the 'Rollback' stage useful when implementation fails (but surely it doesn't happen to you, however, implement the stage).
Thanks for your time and I waiting for your feedback :)!