This is a repository based on the studies of the course: Docker para QAs
-
Good for share your local environment with the docker container
-
You must run this command on the root of this repository
docker run -d -p 8081:80 -v $(pwd)/app:/usr/share/nginx/html --name parodify-qa nginx
# -d is to detach the container from your terminal
# -p localPort:containerPort attach the service provided in the container and delivered in port 80 inside the container to the local host port 8081
# -v use the volume shared strategy from Docker where you can share the same data on a local host folder to a place inside the container. In that way changes made in one of the places (local or in docker) are the same on both places.
- Have a docker image for your test environment with all the specifications that you need.
docker build -t parodify .
# -t tags the image that will be build with the name of your preference
docker run -d -p 8081:80 --name parodify-builded parodify
# Check that you do not need the -v tag because you are wraping the source code into the builded image.
# Note. If you do changes on the app folder locally you ned to re-build your docker image.
http://localhost:8081/