This git repository contains necesary services for used Jenkins with docker and docker-compose inside.
-
Install Docker and Docker Compose
-
Change sockets permission for jenkins access to docker
$ sudo chmod 666 /var/run/docker.sock
-
Set environment variables
$ source envs
-
Run Jenkins service and detach
$ export COMPOSE_FILE=production.yml $ docker-compose up -d
-
Check port 8080 is open and go to http://your-domain:8080
-
Get password and start Jenkins
$ docker-compose logs
If you need to connect to an external network that belong to other services, run Jenkins with:
$ export COMPOSE_FILE=proxy_network.yml
$ docker-compose up -d
Rename the external network with your external network name.
Example:
networks:
proxy:
external:
name: <your-external-network-name>