Skip to content

Project files for a CI environment using Docker

Notifications You must be signed in to change notification settings

mthad/docker-ci

 
 

Repository files navigation

Docker CI - Continuous integration with docker containers

Basic architecture

Architecure

Running the project

To launch the CI environment, first make sure to take down the containers if they already exists:

docker-compose --file docker-compose.yml down

Then run:

docker-compose --file docker-compose.yml up -d

You can access the GUIs at:

Without NGinX

If you want to run the project without the NGinX server (if for example you already have a reverse proxy on your machine) you can do so like this:

docker-compose --file docker-compose.yml up jenkins sonarqube

You will have to use port numbers to access the GUIs:

Accessing the containers

This project includes a Bash script to simplify the docker exec syntax for connecting to containers as the root user:

./dexec.sh <container-name> <command>

Here are some useful examples:

# Run Bash commands in the Jenkins container
./dexec.sh docker-ci-jenkins bash

# Run Bash commands in the SonarQube container
./dexec.sh docker-ci-sonarqube bash

# Run Bash commands in the Nginx container
./dexec.sh docker-ci-nginx bash

Changing the NGinX configuration

To sync the config project config file from your project to the container (copy file to container and reload config):

docker cp nginx.conf docker-ci:/etc/nginx/conf.d/docker-ci.conf && ./dexec.sh docker-ci "nginx -s reload"

About

Project files for a CI environment using Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%