https://github.com/theogrammer/csc_439_lab_2
https://github.com/theogrammer/csc_439_lab_2
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/theogrammer/csc_439_lab_2
- Owner: theogrammer
- Created: 2022-09-07T13:55:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-13T02:24:05.000Z (over 2 years ago)
- Last Synced: 2025-01-17T21:42:51.357Z (4 months ago)
- Language: PHP
- Size: 915 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
================================
== TO BUILD
================================docker build -t lab2 .
- This command means "build a docker image from the current directory, ".", and tag it as "lab2".
================================
== TO RUN
================================powershell:
docker run -it --rm --name lab2_container -v ${pwd}:/usr/src/myapp lab2bash:
docker run -it --rm --name lab2_container -v $(pwd):/usr/src/myapp lab2- This command means "Run the image lab2 with the following options":
-it : run interactively
--rm : remove container when it exits
--name : name it lab2_container, for when we use "docker ps" to see what containers are running.
-v : mount our current directory to the container, so we don't have to rebuild every code change.================================
== TO TEST
================================powershell:
docker run -it --rm --name lab2_container -v ${pwd}:/usr/src/myapp lab2 phpunit .bash:
docker run -it --rm --name lab2_container -v $(pwd):/usr/src/myapp lab2 phpunit .- This command is similar to run, but after the image name (lab2) we override the default CMD with our phpunit command "phpunit ." .
================================
== NOTES
================================
- Remember, you can use the up and down arrow keys to cycle through previous commands on the terminal
- The -it option will not work with Git Bash on Windows; use PowerShell, Cygwin, or WSL.
- The difference between Powershell and Bash variants is the {} or () in the pwd.
- These docker commands can have issues with spaces in paths with bash; try to put your code in a path with no spaces.