@@ -35,7 +35,7 @@ reference to create or run a container based on an image.
3535
3636An image tag is the image version, which defaults to ` latest ` when omitted. Use
3737the tag to run a container from specific version of an image. For example, to
38- run version ` 23.10 ` of the ` ubuntu ` image: ` docker run ubuntu:23.10 ` .
38+ run version ` 24.04 ` of the ` ubuntu ` image: ` docker run ubuntu:24.04 ` .
3939
4040#### Image digests
4141
@@ -400,22 +400,22 @@ We have four ways to set user memory usage:
400400Examples:
401401
402402``` console
403- $ docker run -it ubuntu:22 .04 /bin/bash
403+ $ docker run -it ubuntu:24 .04 /bin/bash
404404```
405405
406406We set nothing about memory, this means the processes in the container can use
407407as much memory and swap memory as they need.
408408
409409``` console
410- $ docker run -it -m 300M --memory-swap -1 ubuntu:22 .04 /bin/bash
410+ $ docker run -it -m 300M --memory-swap -1 ubuntu:24 .04 /bin/bash
411411```
412412
413413We set memory limit and disabled swap memory limit, this means the processes in
414414the container can use 300M memory and as much swap memory as they need (if the
415415host supports swap memory).
416416
417417``` console
418- $ docker run -it -m 300M ubuntu:22 .04 /bin/bash
418+ $ docker run -it -m 300M ubuntu:24 .04 /bin/bash
419419```
420420
421421We set memory limit only, this means the processes in the container can use
@@ -424,7 +424,7 @@ We set memory limit only, this means the processes in the container can use
424424would be 2* 300M, so processes can use 300M swap memory as well.
425425
426426``` console
427- $ docker run -it -m 300M --memory-swap 1G ubuntu:22 .04 /bin/bash
427+ $ docker run -it -m 300M --memory-swap 1G ubuntu:24 .04 /bin/bash
428428```
429429
430430We set both memory and swap memory, so the processes in the container can use
@@ -450,7 +450,7 @@ The following example limits the memory (`-m`) to 500M and sets the memory
450450reservation to 200M.
451451
452452``` console
453- $ docker run -it -m 500M --memory-reservation 200M ubuntu:22 .04 /bin/bash
453+ $ docker run -it -m 500M --memory-reservation 200M ubuntu:24 .04 /bin/bash
454454```
455455
456456Under this configuration, when the container consumes memory more than 200M and
@@ -460,7 +460,7 @@ memory below 200M.
460460The following example set memory reservation to 1G without a hard memory limit.
461461
462462``` console
463- $ docker run -it --memory-reservation 1G ubuntu:22 .04 /bin/bash
463+ $ docker run -it --memory-reservation 1G ubuntu:24 .04 /bin/bash
464464```
465465
466466The container can use as much memory as it needs. The memory reservation setting
@@ -478,13 +478,13 @@ The following example limits the memory to 100M and disables the OOM killer for
478478this container:
479479
480480``` console
481- $ docker run -it -m 100M --oom-kill-disable ubuntu:22 .04 /bin/bash
481+ $ docker run -it -m 100M --oom-kill-disable ubuntu:24 .04 /bin/bash
482482```
483483
484484The following example, illustrates a dangerous way to use the flag:
485485
486486``` console
487- $ docker run -it --oom-kill-disable ubuntu:22 .04 /bin/bash
487+ $ docker run -it --oom-kill-disable ubuntu:24 .04 /bin/bash
488488```
489489
490490The container has unlimited memory which can cause the host to run out memory
@@ -554,14 +554,14 @@ limit and "K" the kernel limit. There are three possible ways to set limits:
554554Examples:
555555
556556``` console
557- $ docker run -it -m 500M --kernel-memory 50M ubuntu:22 .04 /bin/bash
557+ $ docker run -it -m 500M --kernel-memory 50M ubuntu:24 .04 /bin/bash
558558```
559559
560560We set memory and kernel memory, so the processes in the container can use
561561500M memory in total, in this 500M memory, it can be 50M kernel memory tops.
562562
563563``` console
564- $ docker run -it --kernel-memory 50M ubuntu:22 .04 /bin/bash
564+ $ docker run -it --kernel-memory 50M ubuntu:24 .04 /bin/bash
565565```
566566
567567We set kernel memory without ** -m** , so the processes in the container can
@@ -578,7 +578,7 @@ between 0 and 100. A value of 0 turns off anonymous page swapping. A value of
578578For example, you can set:
579579
580580``` console
581- $ docker run -it --memory-swappiness=0 ubuntu:22 .04 /bin/bash
581+ $ docker run -it --memory-swappiness=0 ubuntu:24 .04 /bin/bash
582582```
583583
584584Setting the ` --memory-swappiness ` option is helpful when you want to retain the
@@ -629,7 +629,7 @@ And usually `--cpu-period` should work with `--cpu-quota`.
629629Examples:
630630
631631``` console
632- $ docker run -it --cpu-period=50000 --cpu-quota=25000 ubuntu:22 .04 /bin/bash
632+ $ docker run -it --cpu-period=50000 --cpu-quota=25000 ubuntu:24 .04 /bin/bash
633633```
634634
635635If there is 1 CPU, this means the container can get 50% CPU worth of run-time every 50ms.
@@ -650,13 +650,13 @@ We can set cpus in which to allow execution for containers.
650650Examples:
651651
652652``` console
653- $ docker run -it --cpuset-cpus=" 1,3" ubuntu:22 .04 /bin/bash
653+ $ docker run -it --cpuset-cpus=" 1,3" ubuntu:24 .04 /bin/bash
654654```
655655
656656This means processes in container can be executed on cpu 1 and cpu 3.
657657
658658``` console
659- $ docker run -it --cpuset-cpus=" 0-2" ubuntu:22 .04 /bin/bash
659+ $ docker run -it --cpuset-cpus=" 0-2" ubuntu:24 .04 /bin/bash
660660```
661661
662662This means processes in container can be executed on cpu 0, cpu 1 and cpu 2.
@@ -667,14 +667,14 @@ on NUMA systems.
667667Examples:
668668
669669``` console
670- $ docker run -it --cpuset-mems=" 1,3" ubuntu:22 .04 /bin/bash
670+ $ docker run -it --cpuset-mems=" 1,3" ubuntu:24 .04 /bin/bash
671671```
672672
673673This example restricts the processes in the container to only use memory from
674674memory nodes 1 and 3.
675675
676676``` console
677- $ docker run -it --cpuset-mems=" 0-2" ubuntu:22 .04 /bin/bash
677+ $ docker run -it --cpuset-mems=" 0-2" ubuntu:24 .04 /bin/bash
678678```
679679
680680This example restricts the processes in the container to only use memory from
@@ -706,8 +706,8 @@ For example, the commands below create two containers with different blkio
706706weight:
707707
708708``` console
709- $ docker run -it --name c1 --blkio-weight 300 ubuntu:22 .04 /bin/bash
710- $ docker run -it --name c2 --blkio-weight 600 ubuntu:22 .04 /bin/bash
709+ $ docker run -it --name c1 --blkio-weight 300 ubuntu:24 .04 /bin/bash
710+ $ docker run -it --name c2 --blkio-weight 600 ubuntu:24 .04 /bin/bash
711711```
712712
713713If you do block IO in the two containers at the same time, by, for example:
@@ -923,11 +923,11 @@ For interacting with the network stack, instead of using `--privileged` they
923923should use ` --cap-add=NET_ADMIN ` to modify the network interfaces.
924924
925925``` console
926- $ docker run -it --rm ubuntu:22 .04 ip link add dummy0 type dummy
926+ $ docker run -it --rm ubuntu:24 .04 ip link add dummy0 type dummy
927927
928928RTNETLINK answers: Operation not permitted
929929
930- $ docker run -it --rm --cap-add=NET_ADMIN ubuntu:22 .04 ip link add dummy0 type dummy
930+ $ docker run -it --rm --cap-add=NET_ADMIN ubuntu:24 .04 ip link add dummy0 type dummy
931931```
932932
933933To mount a FUSE based filesystem, you need to combine both ` --cap-add ` and
0 commit comments