Created
August 23, 2018 12:40
-
-
Save Caffe1neAdd1ct/551e84ed89a75188ce90ecba39fe5c58 to your computer and use it in GitHub Desktop.
Docker commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Start service | |
| sudo systemctl start docker | |
| # Build | |
| sudo docker build -t php5-test . | |
| # Run | |
| sudo docker run -itd --entrypoint /bin/sh --name php5-test-app php5-test | |
| # Run with strace available | |
| sudo su root -l | |
| echo '/tmp/coredump-%e.%p' > /proc/sys/kernel/core_pattern | |
| ctrl+d | |
| sudo docker run -itd --security-opt seccomp:unconfined --entrypoint /bin/sh --name php5-test-app php5-test | |
| # Attached to shell | |
| sudo docker exec -it php5-test-app /bin/bash | |
| # Installing packages requires package cache | |
| apt-get upgrade && apt-get install vim strace | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment