Quick little run through of how to set up a docker container to run locally to debug any Pipeline scripts you may be running.
-
Clone repo
-
Open the Dockerfile and change the
DOCKER_IMAGE
value to the image you wish to use (e.g.selenium/standalone-chrome
). -
Open the docker-compose.yml and make the following changes:
- Change
DOCKER_IMAGE_BASE
to whatever image you are using (from theDockerfile
) - Change
../RELATIVE_DIRECTORY_TO_COPY
to the directory you wish to copy into the Docker container for debugging. - Change
/usr/lib/DIRECTORY_TO_COPY
, similar to the above.
- Change
-
Build the docker container with
docker-compose build
-
Start-up the docker container with
docker-compose up -d
-
SSH into the docker container with
docker-compose exec NAME_OF_IMAGE bash
-
Run any scripts you need to run from
/usr/lib/DIRECTORY_YOU_COPIED