Skip to content

Instantly share code, notes, and snippets.

@Caffe1neAdd1ct
Created August 23, 2018 12:40
Show Gist options
  • Save Caffe1neAdd1ct/551e84ed89a75188ce90ecba39fe5c58 to your computer and use it in GitHub Desktop.
Save Caffe1neAdd1ct/551e84ed89a75188ce90ecba39fe5c58 to your computer and use it in GitHub Desktop.
Docker commands
# 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