Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 649 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 649 Bytes

cicd-jenkins-lab

Docker commands:

List running containers:
docker ps

SSH in to container:
docker exec -it <container.id> /bin/bash

SSH in to jenkins container:
docker exec -it $(docker ps | grep lab_jenkins | awk '{print $1}') /bin/bash

SSH in to jenkins container as root:
docker exec -u 0 -it $(docker ps | grep lab_jenkins | awk '{print $1}') /bin/bash

Stop op running containers and Delete all containers including not running containers and delete docker images:
sudo docker kill $(docker ps -q) && docker rm $(docker ps -a -q) && docker rmi -f $(docker images -q)