Docker - mosinn/DOCS-n-Snippets-n-Steps GitHub Wiki

Pull image from Org Docker registry into local and see if it runs

  • docker pull <artificatoryhost>/<jfrog docker image path>
  • docker container run -e JAVA_OPTS="-Dspring.profiles.active=local" -p 8080:8080 <imgId>

(@a.1) Inspect docker folder str (even if normal run fails), to just open sh(ell)

  • docker container run -it <img id> sh

Copy docker file system to local for inspection, while container has been started with (@a.1)

  • docker cp <imageid>:/<docker folder path to copy> -space- c:\U

Auto cleanup after container exits

  • --rm flag to be used when starting up the container

Load multiple volumes while running container, specify Container Name etc, unix \ line separator multiline etc eg envoy

  • docker run --name envoy --rm -it \
  • -v /Users/hakakm/U/repos/innovation/envoy/config/envoy-custom.yaml:/envoy-custom.yaml \
  • -v /Users/hakakm/U/repos/innovation/envoy/logs:/logs \
  • -p 9901:9901 \
  • -p 10000:10000 \
  • 145035942763 <<<IMG ID>>>> \
  • -c /etc/envoy/envoy.yaml \
  • --log-path logs/custom.log
⚠️ **GitHub.com Fallback** ⚠️