In my series about Modern Infrastructure for your Virtual Development Server I will now start with the easiest case for me. I will run a Server on a Docker Desktop on Windows. As I need CI for all of my projects I will use Jenkins as example for this. See how this works.
Here you see the architecture overview:
At first you need to install Docker Desktop Windows.
Docker Compose is then already installed with Docker Desktop.
Next I create a Docker Compose file for my Jenkins server. To make it easy for this blog I will start only a standard Jenkins server, for this I use the most parameters from Jenkins documentation.
version: '3.8' (1) services: jenkins: (2) environment: - DOCKER_CERT_PATH=/certs/client - DOCKER_HOST=tcp://docker:2376 - DOCKER_TLS_VERIFY=1 image: jenkins/jenkins:lts-jdk17 (3) ports: - "8080:8080" - "50000:50000" restart: unless-stopped (4) volumes: - jenkins_data:/var/jenkins_home - jenkins_docker_certs:/certs/client:ro volumes: jenkins_data: jenkins_docker_certs:
|1||Compose file format should match to the Compatibility matrix.|
|2||Jenkins is the single service for our example.|
|3||I use the long term support Jenkins image with JDK 11 runtime.|
|4||The service should be started with Docker Desktop and in case of an error.|
From the directory of your files you can now use following commands to control your Development Server:
docker compose up --detach docker compose stop docker compose down
If you start your server you should see the following in the Docker Desktop Console:
As your server is running you can now access it via localhost:8080:
You can go now to Docker Desktop,
|1||open the container console|
|2||and get the password to further configure Jenkins from the browser.|
In a later blog I will show you a ready configured Jenkins server via Infrastructure as Code.
You find all sources on GitHub.