Docker image to work with Firefox and Chrome.
You have to install Docker following the installation steps (choose your OS).
There are two options to build the image:
You can build the app from this directory running:
docker build -t agomezmoron/docker-browsers .
If you want to choose a custom Firefox version and/or defining the VNC password:
docker build --build-arg FIREFOX_VERSION=47.0.1 --build-arg VNC_PASSWD=1234 - -t agomezmoron/docker-browsers .
You can pull the image from Docker:
docker pull agomezmoron/docker-browsers
Run the image with the following command:
docker run --privileged -v /YOUR/TESTS/FOLDER:/src -t -i agomezmoron/docker-browsers
or
docker run --privileged -v /YOUR/TESTS/FOLDER:/src -d -t -i agomezmoron/docker-browsers
Important: If you are running Docker on Windwos, please check you have the shared drives enabled:
Once Docker is running our image, there is a way to stop it:
- Execute docker ps and you will get the Container ID.
- Then, execute docker kill CONTAINER_ID and the Docker image will be stoped.
If you want to clean all the untagged images you have in your Docker you can perform:
docker rmi -f $(docker images -f "dangling=true" -q) &> /dev/null
and it will detelete all the past images of the builds, so the PC does not end up with several duplicated images. It can be removed without affecting the build.