-it
: interactivedocker run -it debian
-e
: environnement variabledocker run -e FOO=bar debian
-v
: volumedocker run -v $(pwd):/mnt debian
-d
: detacheddocker run -d debian
docker build -t my_debian .
# then
docker run my_debian
-t
: tag the image
You need to add --platform linux/amd64
(for example) to use the amd64 because by default, it use the platform of the computer (arm64
)
You need to add this option during docker build
and docker run
commands
It's useful to add
CMD ["nginx", "-g", "'daemon off;'"]
to force nginx to run in foreground (and not in background)