Here is my reminder of docker utils :

This article is updated regularly with new docker problems (solved)

  • docker ps – Lists containers. ( -l : last, -a : all )
  • docker logs – Shows us the standard output of a container.
  • docker stop – Stops running containers.
  • docker rm cont_name – Remove the container
  • docker top – equivalent to top linux
  • docker logs or docker logs -f cont_name – see logs from container
  • docker run -d -p 80:5000 training/webapp python app.py : bind port 5000 of container to port 80 of the host.
  • we can use docker port cont_name port_to_bind
  • docker commit -m « Added json gem » -a « Kate Smith » 0b2616b0e5a8 ouruser/sinatra:v2 – commit the changes in the container

https://github.com/rogaha/docker-desktop/blob/master/Dockerfile

launching a container to run Fast-Models ARMv8:

docker run -t -i -P -v /home/vosys/Nicolas_Dagieu/ARM_licenses:/home/fmuser/fmlicense –mac-address 00:xx:xx:xx:xx:xx –privileged fmv8-ready /bin/bash

 

Enable NFS support between docker container and guests ( in docker ) :

When you want to share folders by NFS on docker, some problems some with. You need to enable the –privileged to enable permissions for nfs-kernel-server module. If nfs-kernel-server isn’t running, restart it. If problem persists, restart rpcbind service also and nfs-kernel-server too.

 

Share content between Host and container :

Just add the « -v » option, if permission problems append :

--privileged=true (permission fix)
-v /folder/on/host:/destination/container (sharing content)