Docker container useful options - HaymonEdmur/DockerConfiguration GitHub Wiki
docker container run --rm -it \
--name=myalpine \
--hostname myalpine \
--tmpfs /opt/messages \ # Root is mounted for read only. This would allow rw. This dir will not be shared
-e COMPANY="Roche Products"\
-e CITY="Tardeo Mumbai"\
--env-file="/tmp/my.env"\
--memory=10485760 \
--read-only \ # Root file is for read only mode
-u 1000 \ # 1000 is missing in /etc/passwd & processes would be owned by this non-root
--group-add 2000 \ # secondary group of 1000
--entrypoint "/bin/sh" \ ### OVER WRITE ENTRYPOINT in image. Very useful
--volumes-from mytmp \ # mytmp is a container. We are sharing all its volume in this container.
--privileged \ # Dangerous : Get full access to /dev of host.
alpine:latest