I start a container from a docker image using docker run
command + many arguments, like:
docker run -d --name=ubu2 --restart=always --pids-limit 400 --memory=3g --memory-swap=6g --cpus="2.0" -p 127.0.0.1:8585:8585 -v /apps:/apps ubuImage
when I execute
docker inspect ubu2
I can correctly see my settings in the description of the container.
When I restart the container using simply docker restart ubu2
, I can still see my settings. Is this the expected behaviour? Shouldn't the container start fresh, without the settings from the run command arguments?
In general what is the best way to keep such kind of settings in the definition of the container?
More - if I want to change the value of any of them, let's say memory to 4GB - what is the appropriate way to do this? docker container update
?