Jenkins setup with Docker and JCasC - Automate it now
This article covers how to perform Jenkins Configuration as Code (JCasC) method which can help us to automate the setup of Jenkins using Docker.
This will automate the installation and configuration of Jenkins using Docker and the Jenkins Configuration as Code (JCasC) method.
Jenkins uses a pluggable architecture to provide most of its functionality.
JCasC makes use of the Configuration as Code plugin, which allows you to define the desired state of your Jenkins configuration as one or more YAML file(s), eliminating the need for the setup wizard.
On initialization, the Configuration as Code plugin would configure Jenkins according to the configuration file(s), greatly reducing the configuration time and eliminating human errors.
Just as the Pipeline plugin enables developers to define their jobs inside a Jenkinsfile, the Configuration as Code plugin enables administrators to define the Jenkins configuration inside a YAML file.
Both of these plugins bring Jenkins closer aligned with the Everything as Code (EaC) paradigm.
Docker error while loading shared libraries
This article covers how to fix docker #error while loading shared libraries which happens in the process of building a docker image.
The docker run command creates a container from a given image and starts the container using a given command. It is one of the first commands you should become familiar with when starting to work with #Docker.
Docker containers make it easy to put new versions of software, with new business features, into production quickly—and to quickly roll back to a previous version if you need to.
They also make it easier to implement strategies like blue/green deployments.
To stop all running containers:
1. kill all running #containers with docker kill $(docker ps -q)
2. delete all stopped containers with docker rm $(docker ps -a -q)
3. delete all images with docker rmi $(docker images -q)
4. update and stop a container that is in a crash-loop with docker update --restart=no && docker stop.
Updating Docker Container automatically
This article will guide you on how to update Docker Container using Watchtower.
Exporting and importing docker containers
This article will take you through the steps to export and import docker containers between on server to another server using simple ssh commands.