[{"data":1,"prerenderedAt":1315},["ShallowReactive",2],{"wiki-page-/en-us/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang":3,"wiki-doc-items-/en-us/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang":1233,"language-switcher-data-/en-us/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang":1299,"wiki-i18n-paths-/en-us/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang":1314},{"id":4,"title":5,"body":6,"canonicalPath":1214,"chapter":1215,"chapterSort":1216,"date":1217,"description":15,"docI18nKey":1218,"docKey":1219,"docRoot":1220,"docTitle":1221,"extension":1222,"i18nKey":1223,"isBlogPost":1224,"isWikiDoc":96,"isWikiIndex":1224,"layout":1225,"legacyPath":1225,"locale":1226,"localeSlug":1227,"meta":1228,"navigation":96,"path":1214,"seo":1229,"sourcePath":1230,"sourceStem":1223,"stem":1231,"wikiDepth":93,"__hash__":1232},"content/_i18n/en-us/wiki/2024-10-03-Docker教程/ch8-手动创建Docker镜像.md","Manually create a Docker image",{"type":7,"value":8,"toc":1210},"minimark",[9,16,21,24,27,65,69,74,81,105,108,227,233,236,241,244,251,254,259,262,274,277,282,289,320,327,403,408,411,434,437,511,516,519,524,533,538,543,547,558,560,567,570,573,584,587,590,620,623,630,1151,1166,1171,1176,1180,1201,1206],[10,11,12],"p",{},[13,14,15],"strong",{},"(If you find it troublesome, just go directly to the sections on deploying with various Docker containers) (If someone else has already set one up for you, don't bother doing it yourself.)",[17,18,20],"h3",{"id":19},"dockerfile","DockerFile",[10,22,23],{},"|command|Explanation|Here is the translation of the provided Simplified Chinese Markdown fragment into natural American English, following all specified rules.",[25,26],"hr",{},[10,28,29,32,33,38,39,43,44,48,49,52,53,56,57,60,61,64],{},[13,30,31],{},"Example","|\n|:---|:---|:---|\n|FROM|Specify the base image, which is the starting point of the Dockerfile.|FROM ubuntu:22.04|\n|LABEL|Add metadata (such as author, version, etc.)|LABEL maintainer=\"",[34,35,37],"a",{"href":36},"mailto:you@example.com","you@example.com","\"|\n|ENV|Set environment variables|ENV PORT=8080|\n|ARG|Build parameters, only available during the build process.|ARG VERSION=1.0|\n|RUN|When building the image, run the command|RUN apt-get update && apt-get install -y curl|\n|COPY|Copy files into the image|COPY . /app|\n|ADD|Similar to COPY, with additional support for extracting .tar files or remote URLs (not recommended for URLs).|ADD archive.tar.gz /data/|\n|WORKDIR|Set the working directory|WORKDIR /opt|\n|CMD|Set the default command when the container starts (can be overridden by ",[40,41,42],"code",{},"docker run",").|CMD ",[45,46,47],"span",{},"\"node\", \"index.js\"","|\n|ENTRYPOINT|Set a fixed command when the container starts (commonly used for CLI tools, etc.)|ENTRYPOINT ",[45,50,51],{},"\"python3\"","|\n|EXPOSE|Declare the ports that services inside the image listen on (will not be automatically mapped).|EXPOSE 80|\n|VOLUME|Declare the data volume mount point|VOLUME ",[45,54,55],{},"\"/data\"","|\n|USER|Set the user for subsequent command execution.|USER appuser|\n|ONBUILD|Build instructions triggered when an image is used as the base image for other images.|ONBUILD COPY . /src|\n|SHELL|Change the default shell, for example, change sh -c to bash -c.|SHELL ",[45,58,59],{},"\"/bin/bash\", \"-c\"","|\n|HEALTHCHECK|Define the health check command for the container runtime.|",[40,62,63],{},"HEALTHCHECK CMD curl --fail http://localhost:8080","|\n|STOPSIGNAL|Signal sent when the container stops|STOPSIGNAL SIGKILL|",[17,66,68],{"id":67},"create-your-own-container","Create your own container",[70,71,73],"h4",{"id":72},"manually-created","Manually created",[10,75,76],{},[34,77,78],{"href":78,"rel":79},"https://github.com/tungchiahui/ros-docker",[80],"nofollow",[82,83,88],"pre",{"className":84,"code":85,"language":86,"meta":87,"style":87},"language-bash shiki shiki-themes github-light github-dark","\n# DockerFile内容请看Github仓库中的DockerFile\n","bash","",[40,89,90,98],{"__ignoreMap":87},[45,91,94],{"class":92,"line":93},"line",1,[45,95,97],{"emptyLinePlaceholder":96},true,"\n",[45,99,101],{"class":92,"line":100},2,[45,102,104],{"class":103},"sJ8bj","# DockerFile内容请看Github仓库中的DockerFile\n",[10,106,107],{},"Compiling x86 on an x86 computer:",[82,109,111],{"className":84,"code":110,"language":86,"meta":87,"style":87},"docker build -t ros-melodic-cuda118-cudnn8-bionic:latest .\n\ndocker build -t ros-noetic-focal:latest .\n\ndocker build -t ros-humble-jammy:latest .\n\ndocker build -t ros-jazzy-noble:latest .\n\ndocker build -t ros-humble-opencv411-cuda128-cudnn970-jammy:latest .\n\ndocker build -t ros-jazzy-opencv411-cuda128-cudnn970-noble:latest .\n",[40,112,113,133,137,151,156,170,175,189,194,208,213],{"__ignoreMap":87},[45,114,115,119,123,127,130],{"class":92,"line":93},[45,116,118],{"class":117},"sScJk","docker",[45,120,122],{"class":121},"sZZnC"," build",[45,124,126],{"class":125},"sj4cs"," -t",[45,128,129],{"class":121}," ros-melodic-cuda118-cudnn8-bionic:latest",[45,131,132],{"class":121}," .\n",[45,134,135],{"class":92,"line":100},[45,136,97],{"emptyLinePlaceholder":96},[45,138,140,142,144,146,149],{"class":92,"line":139},3,[45,141,118],{"class":117},[45,143,122],{"class":121},[45,145,126],{"class":125},[45,147,148],{"class":121}," ros-noetic-focal:latest",[45,150,132],{"class":121},[45,152,154],{"class":92,"line":153},4,[45,155,97],{"emptyLinePlaceholder":96},[45,157,159,161,163,165,168],{"class":92,"line":158},5,[45,160,118],{"class":117},[45,162,122],{"class":121},[45,164,126],{"class":125},[45,166,167],{"class":121}," ros-humble-jammy:latest",[45,169,132],{"class":121},[45,171,173],{"class":92,"line":172},6,[45,174,97],{"emptyLinePlaceholder":96},[45,176,178,180,182,184,187],{"class":92,"line":177},7,[45,179,118],{"class":117},[45,181,122],{"class":121},[45,183,126],{"class":125},[45,185,186],{"class":121}," ros-jazzy-noble:latest",[45,188,132],{"class":121},[45,190,192],{"class":92,"line":191},8,[45,193,97],{"emptyLinePlaceholder":96},[45,195,197,199,201,203,206],{"class":92,"line":196},9,[45,198,118],{"class":117},[45,200,122],{"class":121},[45,202,126],{"class":125},[45,204,205],{"class":121}," ros-humble-opencv411-cuda128-cudnn970-jammy:latest",[45,207,132],{"class":121},[45,209,211],{"class":92,"line":210},10,[45,212,97],{"emptyLinePlaceholder":96},[45,214,216,218,220,222,225],{"class":92,"line":215},11,[45,217,118],{"class":117},[45,219,122],{"class":121},[45,221,126],{"class":125},[45,223,224],{"class":121}," ros-jazzy-opencv411-cuda128-cudnn970-noble:latest",[45,226,132],{"class":121},[10,228,229],{},[230,231],"img",{"alt":87,"src":232},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image14.webp",[10,234,235],{},"The image size is 5GB (for the compressed size, see DockerHub).",[10,237,238],{},[230,239],{"alt":87,"src":240},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image15.webp",[10,242,243],{},"The steps to push a Docker image to Docker Hub are as follows:",[245,246,247],"ol",{},[248,249,250],"li",{},"Create a Docker Hub account",[10,252,253],{},"If you don't already have a Docker Hub account, please go to Docker Hub to register a free account.",[245,255,256],{"start":100},[248,257,258],{},"Log in to Docker Hub",[10,260,261],{},"In the terminal, use the following command to log in to your Docker Hub account:",[82,263,265],{"className":84,"code":264,"language":86,"meta":87,"style":87},"docker login\n",[40,266,267],{"__ignoreMap":87},[45,268,269,271],{"class":92,"line":93},[45,270,118],{"class":117},[45,272,273],{"class":121}," login\n",[10,275,276],{},"Enter your Docker Hub username and password for verification.",[245,278,279],{"start":139},[248,280,281],{},"Tag your image",[10,283,284,285,288],{},"Docker Hub uses the format ",[40,286,287],{},"\u003C用户名>/\u003C镜像名>:\u003C标签>"," to identify images. You need to tag your image so it can be pushed to Docker Hub. Use the following command:",[82,290,292],{"className":84,"code":291,"language":86,"meta":87,"style":87},"docker tag ros-jazzy-noble:latest \u003C你的用户名>/ros-jazzy-noble:latest\n",[40,293,294],{"__ignoreMap":87},[45,295,296,298,301,303,307,310,314,317],{"class":92,"line":93},[45,297,118],{"class":117},[45,299,300],{"class":121}," tag",[45,302,186],{"class":121},[45,304,306],{"class":305},"szBVR"," \u003C",[45,308,309],{"class":121},"你的用户",[45,311,313],{"class":312},"sVt8B","名",[45,315,316],{"class":305},">",[45,318,319],{"class":121},"/ros-jazzy-noble:latest\n",[10,321,322,323,326],{},"For example, if your Docker Hub username is ",[40,324,325],{},"tungchiahui",", you should run:",[82,328,330],{"className":84,"code":329,"language":86,"meta":87,"style":87},"docker tag ros-noetic-focal:latest tungchiahui/ros-noetic-focal:latest\n\ndocker tag ros-humble-jammy:latest tungchiahui/ros-humble-jammy:latest\n\ndocker tag ros-jazzy-noble:latest tungchiahui/ros-jazzy-noble:latest\n\ndocker tag ros-humble-opencv411-cuda128-cudnn970-jammy:latest tungchiahui/ros-humble-opencv411-cuda128-cudnn970-jammy:latest\n\ndocker tag ros-jazzy-opencv411-cuda128-cudnn970-noble:latest tungchiahui/ros-jazzy-opencv411-cuda128-cudnn970-noble:latest\n",[40,331,332,343,347,358,362,373,377,388,392],{"__ignoreMap":87},[45,333,334,336,338,340],{"class":92,"line":93},[45,335,118],{"class":117},[45,337,300],{"class":121},[45,339,148],{"class":121},[45,341,342],{"class":121}," tungchiahui/ros-noetic-focal:latest\n",[45,344,345],{"class":92,"line":100},[45,346,97],{"emptyLinePlaceholder":96},[45,348,349,351,353,355],{"class":92,"line":139},[45,350,118],{"class":117},[45,352,300],{"class":121},[45,354,167],{"class":121},[45,356,357],{"class":121}," tungchiahui/ros-humble-jammy:latest\n",[45,359,360],{"class":92,"line":153},[45,361,97],{"emptyLinePlaceholder":96},[45,363,364,366,368,370],{"class":92,"line":158},[45,365,118],{"class":117},[45,367,300],{"class":121},[45,369,186],{"class":121},[45,371,372],{"class":121}," tungchiahui/ros-jazzy-noble:latest\n",[45,374,375],{"class":92,"line":172},[45,376,97],{"emptyLinePlaceholder":96},[45,378,379,381,383,385],{"class":92,"line":177},[45,380,118],{"class":117},[45,382,300],{"class":121},[45,384,205],{"class":121},[45,386,387],{"class":121}," tungchiahui/ros-humble-opencv411-cuda128-cudnn970-jammy:latest\n",[45,389,390],{"class":92,"line":191},[45,391,97],{"emptyLinePlaceholder":96},[45,393,394,396,398,400],{"class":92,"line":196},[45,395,118],{"class":117},[45,397,300],{"class":121},[45,399,224],{"class":121},[45,401,402],{"class":121}," tungchiahui/ros-jazzy-opencv411-cuda128-cudnn970-noble:latest\n",[245,404,405],{"start":153},[248,406,407],{},"Push the image to Docker Hub",[10,409,410],{},"Use the following command to push the image to Docker Hub:",[82,412,414],{"className":84,"code":413,"language":86,"meta":87,"style":87},"docker push \u003C你的用户名>/ros-noetic-jazzy-noble:latest\n",[40,415,416],{"__ignoreMap":87},[45,417,418,420,423,425,427,429,431],{"class":92,"line":93},[45,419,118],{"class":117},[45,421,422],{"class":121}," push",[45,424,306],{"class":305},[45,426,309],{"class":121},[45,428,313],{"class":312},[45,430,316],{"class":305},[45,432,433],{"class":121},"/ros-noetic-jazzy-noble:latest\n",[10,435,436],{},"For example:",[82,438,440],{"className":84,"code":439,"language":86,"meta":87,"style":87},"docker push tungchiahui/ros-noetic-focal:latest\n\ndocker push tungchiahui/ros-humble-jammy:latest\n\ndocker push tungchiahui/ros-jazzy-noble:latest\n\ndocker push tungchiahui/ros-humble-opencv411-cuda128-cudnn970-jammy:latest\n\ndocker push tungchiahui/ros-jazzy-opencv411-cuda128-cudnn970-noble:latest\n\ndocker push tungchiahui/ros-noetic-focal-arm64:latest\n",[40,441,442,450,454,462,466,474,478,486,490,498,502],{"__ignoreMap":87},[45,443,444,446,448],{"class":92,"line":93},[45,445,118],{"class":117},[45,447,422],{"class":121},[45,449,342],{"class":121},[45,451,452],{"class":92,"line":100},[45,453,97],{"emptyLinePlaceholder":96},[45,455,456,458,460],{"class":92,"line":139},[45,457,118],{"class":117},[45,459,422],{"class":121},[45,461,357],{"class":121},[45,463,464],{"class":92,"line":153},[45,465,97],{"emptyLinePlaceholder":96},[45,467,468,470,472],{"class":92,"line":158},[45,469,118],{"class":117},[45,471,422],{"class":121},[45,473,372],{"class":121},[45,475,476],{"class":92,"line":172},[45,477,97],{"emptyLinePlaceholder":96},[45,479,480,482,484],{"class":92,"line":177},[45,481,118],{"class":117},[45,483,422],{"class":121},[45,485,387],{"class":121},[45,487,488],{"class":92,"line":191},[45,489,97],{"emptyLinePlaceholder":96},[45,491,492,494,496],{"class":92,"line":196},[45,493,118],{"class":117},[45,495,422],{"class":121},[45,497,402],{"class":121},[45,499,500],{"class":92,"line":210},[45,501,97],{"emptyLinePlaceholder":96},[45,503,504,506,508],{"class":92,"line":215},[45,505,118],{"class":117},[45,507,422],{"class":121},[45,509,510],{"class":121}," tungchiahui/ros-noetic-focal-arm64:latest\n",[245,512,513],{"start":158},[248,514,515],{},"Verify the push was successful.",[10,517,518],{},"You can verify whether your image has been successfully pushed by visiting your personal page on Docker Hub.",[10,520,521],{},[13,522,523],{},"Notes",[525,526,527,530],"ul",{},[248,528,529],{},"Make sure your image size stays within Docker Hub's limits (typically 10GB).",[248,531,532],{},"If you plan to make the image public, you can set it as a public repository; if you want only yourself to have access, you can set it as a private repository.",[10,534,535],{},[230,536],{"alt":87,"src":537},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image16.webp",[10,539,540],{},[230,541],{"alt":87,"src":542},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image17.webp",[70,544,546],{"id":545},"manual-creation-cross-platform-multi-architecture-build","Manual creation (cross-platform multi-architecture build)",[10,548,549,550,553,554,557],{},"If you want to ",[13,551,552],{},"build images on an x86/x64 computer (i.e., native x86 devices) and also build Docker images for ARM64 devices like Raspberry Pi, Jetson, etc."," , you need to use ",[13,555,556],{},"Docker's cross-platform build functionality",". Here is the complete solution:",[25,559],{},[245,561,562],{},[248,563,564],{},[13,565,566],{},"Enable Docker Cross-Platform Builds",[10,568,569],{},"To simulate an ARM64 environment on an x86 host, the following tools are required:",[10,571,572],{},"Step 1: Enable buildx (only needs to be done once)",[82,574,578],{"className":575,"code":576,"language":577,"meta":87,"style":87},"language-Shell shiki shiki-themes github-light github-dark","docker buildx create --name multiarch_builder --use\n","Shell",[40,579,580],{"__ignoreMap":87},[45,581,582],{"class":92,"line":93},[45,583,576],{},[10,585,586],{},"This will create and enable a builder that supports multi-architecture builds, and it will persist even after a computer restart, so it only needs to be run once.",[10,588,589],{},"Step 2: Install QEMU support (Newer versions of Docker Desktop usually come with it, but Linux requires manual installation). If you are using a server or Linux distribution, make sure the qemu emulator is available:",[82,591,593],{"className":84,"code":592,"language":86,"meta":87,"style":87},"docker run --rm --privileged multiarch/qemu-user-static --reset -p yes\n",[40,594,595],{"__ignoreMap":87},[45,596,597,599,602,605,608,611,614,617],{"class":92,"line":93},[45,598,118],{"class":117},[45,600,601],{"class":121}," run",[45,603,604],{"class":125}," --rm",[45,606,607],{"class":125}," --privileged",[45,609,610],{"class":121}," multiarch/qemu-user-static",[45,612,613],{"class":125}," --reset",[45,615,616],{"class":125}," -p",[45,618,619],{"class":121}," yes\n",[10,621,622],{},"After restarting your computer, it will disappear, so you need to run this command once after each restart, before the buildx command.",[10,624,625,626,629],{},"Step 3: Build Multi-Architecture Images",[627,628],"br",{},"\nUse the following command to build for amd64 and arm64:",[82,631,633],{"className":84,"code":632,"language":86,"meta":87,"style":87},"docker buildx build --platform linux/amd64,linux/arm64 -t \u003C你的镜像名>:\u003C标签> --push .\n\n# 例子：\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros:noetic-focal \\\n --push \\\n .\n\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros:humble-jammy \\\n --push \\\n .\n\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros:jazzy-noble \\\n --push \\\n .\n\n docker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/opencv:411-cuda128-cudnn970-focal \\\n --push \\\n .\n\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/opencv:411-cuda128-cudnn971-jammy \\\n --push \\\n .\n\n docker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/opencv:411-cuda128-cudnn971-noble \\\n --push \\\n .\n\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros-opencv:noetic-411-cuda128-cudnn970-focal \\\n --push \\\n .\n\ndocker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros-opencv:humble-411-cuda128-cudnn970-jammy \\\n --push \\\n .\n\n docker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t tungchiahui/ros-opencv:jazzy-411-cuda128-cudnn970-noble \\\n --push \\\n .\n\n  docker buildx build \\\n--platform linux/amd64,linux/arm64 \\\n -t sdutvincirobot/ros-opencv:humble-411-cuda128-cudnn970-jammy \\\n --push \\\n .\n",[40,634,635,680,684,689,700,710,719,725,729,733,743,751,761,768,773,778,789,798,808,815,820,825,837,846,856,863,868,873,884,893,903,910,915,920,931,940,950,957,962,967,978,987,997,1004,1009,1014,1025,1034,1044,1051,1056,1061,1072,1081,1091,1098,1103,1108,1120,1129,1139,1146],{"__ignoreMap":87},[45,636,637,639,642,644,647,650,652,654,657,659,661,664,667,670,673,675,678],{"class":92,"line":93},[45,638,118],{"class":117},[45,640,641],{"class":121}," buildx",[45,643,122],{"class":121},[45,645,646],{"class":125}," --platform",[45,648,649],{"class":121}," linux/amd64,linux/arm64",[45,651,126],{"class":125},[45,653,306],{"class":305},[45,655,656],{"class":121},"你的镜像",[45,658,313],{"class":312},[45,660,316],{"class":305},[45,662,663],{"class":121},":",[45,665,666],{"class":305},"\u003C",[45,668,669],{"class":121},"标",[45,671,672],{"class":312},"签",[45,674,316],{"class":305},[45,676,677],{"class":125}," --push",[45,679,132],{"class":121},[45,681,682],{"class":92,"line":100},[45,683,97],{"emptyLinePlaceholder":96},[45,685,686],{"class":92,"line":139},[45,687,688],{"class":103},"# 例子：\n",[45,690,691,693,695,697],{"class":92,"line":153},[45,692,118],{"class":117},[45,694,641],{"class":121},[45,696,122],{"class":121},[45,698,699],{"class":125}," \\\n",[45,701,702,705,708],{"class":92,"line":158},[45,703,704],{"class":312},"--platform ",[45,706,707],{"class":121},"linux/amd64,linux/arm64",[45,709,699],{"class":125},[45,711,712,714,717],{"class":92,"line":172},[45,713,126],{"class":125},[45,715,716],{"class":121}," tungchiahui/ros:noetic-focal",[45,718,699],{"class":125},[45,720,721,723],{"class":92,"line":177},[45,722,677],{"class":125},[45,724,699],{"class":125},[45,726,727],{"class":92,"line":191},[45,728,132],{"class":121},[45,730,731],{"class":92,"line":196},[45,732,97],{"emptyLinePlaceholder":96},[45,734,735,737,739,741],{"class":92,"line":210},[45,736,118],{"class":117},[45,738,641],{"class":121},[45,740,122],{"class":121},[45,742,699],{"class":125},[45,744,745,747,749],{"class":92,"line":215},[45,746,704],{"class":312},[45,748,707],{"class":121},[45,750,699],{"class":125},[45,752,754,756,759],{"class":92,"line":753},12,[45,755,126],{"class":125},[45,757,758],{"class":121}," tungchiahui/ros:humble-jammy",[45,760,699],{"class":125},[45,762,764,766],{"class":92,"line":763},13,[45,765,677],{"class":125},[45,767,699],{"class":125},[45,769,771],{"class":92,"line":770},14,[45,772,132],{"class":121},[45,774,776],{"class":92,"line":775},15,[45,777,97],{"emptyLinePlaceholder":96},[45,779,781,783,785,787],{"class":92,"line":780},16,[45,782,118],{"class":117},[45,784,641],{"class":121},[45,786,122],{"class":121},[45,788,699],{"class":125},[45,790,792,794,796],{"class":92,"line":791},17,[45,793,704],{"class":312},[45,795,707],{"class":121},[45,797,699],{"class":125},[45,799,801,803,806],{"class":92,"line":800},18,[45,802,126],{"class":125},[45,804,805],{"class":121}," tungchiahui/ros:jazzy-noble",[45,807,699],{"class":125},[45,809,811,813],{"class":92,"line":810},19,[45,812,677],{"class":125},[45,814,699],{"class":125},[45,816,818],{"class":92,"line":817},20,[45,819,132],{"class":121},[45,821,823],{"class":92,"line":822},21,[45,824,97],{"emptyLinePlaceholder":96},[45,826,828,831,833,835],{"class":92,"line":827},22,[45,829,830],{"class":117}," docker",[45,832,641],{"class":121},[45,834,122],{"class":121},[45,836,699],{"class":125},[45,838,840,842,844],{"class":92,"line":839},23,[45,841,704],{"class":312},[45,843,707],{"class":121},[45,845,699],{"class":125},[45,847,849,851,854],{"class":92,"line":848},24,[45,850,126],{"class":125},[45,852,853],{"class":121}," tungchiahui/opencv:411-cuda128-cudnn970-focal",[45,855,699],{"class":125},[45,857,859,861],{"class":92,"line":858},25,[45,860,677],{"class":125},[45,862,699],{"class":125},[45,864,866],{"class":92,"line":865},26,[45,867,132],{"class":121},[45,869,871],{"class":92,"line":870},27,[45,872,97],{"emptyLinePlaceholder":96},[45,874,876,878,880,882],{"class":92,"line":875},28,[45,877,118],{"class":117},[45,879,641],{"class":121},[45,881,122],{"class":121},[45,883,699],{"class":125},[45,885,887,889,891],{"class":92,"line":886},29,[45,888,704],{"class":312},[45,890,707],{"class":121},[45,892,699],{"class":125},[45,894,896,898,901],{"class":92,"line":895},30,[45,897,126],{"class":125},[45,899,900],{"class":121}," tungchiahui/opencv:411-cuda128-cudnn971-jammy",[45,902,699],{"class":125},[45,904,906,908],{"class":92,"line":905},31,[45,907,677],{"class":125},[45,909,699],{"class":125},[45,911,913],{"class":92,"line":912},32,[45,914,132],{"class":121},[45,916,918],{"class":92,"line":917},33,[45,919,97],{"emptyLinePlaceholder":96},[45,921,923,925,927,929],{"class":92,"line":922},34,[45,924,830],{"class":117},[45,926,641],{"class":121},[45,928,122],{"class":121},[45,930,699],{"class":125},[45,932,934,936,938],{"class":92,"line":933},35,[45,935,704],{"class":312},[45,937,707],{"class":121},[45,939,699],{"class":125},[45,941,943,945,948],{"class":92,"line":942},36,[45,944,126],{"class":125},[45,946,947],{"class":121}," tungchiahui/opencv:411-cuda128-cudnn971-noble",[45,949,699],{"class":125},[45,951,953,955],{"class":92,"line":952},37,[45,954,677],{"class":125},[45,956,699],{"class":125},[45,958,960],{"class":92,"line":959},38,[45,961,132],{"class":121},[45,963,965],{"class":92,"line":964},39,[45,966,97],{"emptyLinePlaceholder":96},[45,968,970,972,974,976],{"class":92,"line":969},40,[45,971,118],{"class":117},[45,973,641],{"class":121},[45,975,122],{"class":121},[45,977,699],{"class":125},[45,979,981,983,985],{"class":92,"line":980},41,[45,982,704],{"class":312},[45,984,707],{"class":121},[45,986,699],{"class":125},[45,988,990,992,995],{"class":92,"line":989},42,[45,991,126],{"class":125},[45,993,994],{"class":121}," tungchiahui/ros-opencv:noetic-411-cuda128-cudnn970-focal",[45,996,699],{"class":125},[45,998,1000,1002],{"class":92,"line":999},43,[45,1001,677],{"class":125},[45,1003,699],{"class":125},[45,1005,1007],{"class":92,"line":1006},44,[45,1008,132],{"class":121},[45,1010,1012],{"class":92,"line":1011},45,[45,1013,97],{"emptyLinePlaceholder":96},[45,1015,1017,1019,1021,1023],{"class":92,"line":1016},46,[45,1018,118],{"class":117},[45,1020,641],{"class":121},[45,1022,122],{"class":121},[45,1024,699],{"class":125},[45,1026,1028,1030,1032],{"class":92,"line":1027},47,[45,1029,704],{"class":312},[45,1031,707],{"class":121},[45,1033,699],{"class":125},[45,1035,1037,1039,1042],{"class":92,"line":1036},48,[45,1038,126],{"class":125},[45,1040,1041],{"class":121}," tungchiahui/ros-opencv:humble-411-cuda128-cudnn970-jammy",[45,1043,699],{"class":125},[45,1045,1047,1049],{"class":92,"line":1046},49,[45,1048,677],{"class":125},[45,1050,699],{"class":125},[45,1052,1054],{"class":92,"line":1053},50,[45,1055,132],{"class":121},[45,1057,1059],{"class":92,"line":1058},51,[45,1060,97],{"emptyLinePlaceholder":96},[45,1062,1064,1066,1068,1070],{"class":92,"line":1063},52,[45,1065,830],{"class":117},[45,1067,641],{"class":121},[45,1069,122],{"class":121},[45,1071,699],{"class":125},[45,1073,1075,1077,1079],{"class":92,"line":1074},53,[45,1076,704],{"class":312},[45,1078,707],{"class":121},[45,1080,699],{"class":125},[45,1082,1084,1086,1089],{"class":92,"line":1083},54,[45,1085,126],{"class":125},[45,1087,1088],{"class":121}," tungchiahui/ros-opencv:jazzy-411-cuda128-cudnn970-noble",[45,1090,699],{"class":125},[45,1092,1094,1096],{"class":92,"line":1093},55,[45,1095,677],{"class":125},[45,1097,699],{"class":125},[45,1099,1101],{"class":92,"line":1100},56,[45,1102,132],{"class":121},[45,1104,1106],{"class":92,"line":1105},57,[45,1107,97],{"emptyLinePlaceholder":96},[45,1109,1111,1114,1116,1118],{"class":92,"line":1110},58,[45,1112,1113],{"class":117},"  docker",[45,1115,641],{"class":121},[45,1117,122],{"class":121},[45,1119,699],{"class":125},[45,1121,1123,1125,1127],{"class":92,"line":1122},59,[45,1124,704],{"class":312},[45,1126,707],{"class":121},[45,1128,699],{"class":125},[45,1130,1132,1134,1137],{"class":92,"line":1131},60,[45,1133,126],{"class":125},[45,1135,1136],{"class":121}," sdutvincirobot/ros-opencv:humble-411-cuda128-cudnn970-jammy",[45,1138,699],{"class":125},[45,1140,1142,1144],{"class":92,"line":1141},61,[45,1143,677],{"class":125},[45,1145,699],{"class":125},[45,1147,1149],{"class":92,"line":1148},62,[45,1150,132],{"class":121},[10,1152,1153,1154,1157,1158,1161,1162,1165],{},"Note: ",[40,1155,1156],{},"--platform"," specifies multi-architecture. ",[40,1159,1160],{},"--push"," is required because buildx's multi-platform builds cannot be loaded locally by default (unless ",[40,1163,1164],{},"--load"," is added, but that only supports a single architecture).",[10,1167,1168],{},[230,1169],{"alt":87,"src":1170},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image18.webp",[10,1172,1173],{},[230,1174],{"alt":87,"src":1175},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image19.webp",[70,1177,1179],{"id":1178},"clear-build-cache","Clear build cache",[82,1181,1185],{"className":1182,"code":1183,"language":1184,"meta":87,"style":87},"language-C++ shiki shiki-themes github-light github-dark","\n# 清理BuildKit构建缓存\ndocker builder prune -f  \n","C++",[40,1186,1187,1191,1196],{"__ignoreMap":87},[45,1188,1189],{"class":92,"line":93},[45,1190,97],{"emptyLinePlaceholder":96},[45,1192,1193],{"class":92,"line":100},[45,1194,1195],{},"# 清理BuildKit构建缓存\n",[45,1197,1198],{"class":92,"line":139},[45,1199,1200],{},"docker builder prune -f\n",[10,1202,1203],{},[230,1204],{"alt":87,"src":1205},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/10/03/image20.webp",[1207,1208,1209],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}",{"title":87,"searchDepth":100,"depth":100,"links":1211},[1212,1213],{"id":19,"depth":139,"text":20},{"id":67,"depth":139,"text":68},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","8",8000000,"2024-10-03","wiki/2024-10-03-docker-jiao-cheng","en-us:2024-10-03-docker-jiao-cheng","/en-us/wiki/2024-10-03-docker-jiao-cheng","Docker教程","md","wiki/2024-10-03-Docker教程/ch8-手动创建Docker镜像",false,null,"en-US","en-us",{},{"title":5,"description":15},"/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","_i18n/en-us/wiki/2024-10-03-Docker教程/ch8-手动创建Docker镜像","zNgm3jh8z73iO2qqeANCptOZL96pNIu1KXCQCHQFJjs",[1234,1240,1246,1252,1258,1264,1270,1276,1282,1288,1289,1295],{"path":1235,"stem":1236,"title":1237,"date":1217,"chapter":1238,"chapterSort":1239,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch1-jian-jie","_i18n/en-us/wiki/2024-10-03-Docker教程/ch1-简介","Introduction","1",1000000,{"path":1241,"stem":1242,"title":1243,"date":1217,"chapter":1244,"chapterSort":1245,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch10-1-kuai-su-da-kai-zhong-duan","_i18n/en-us/wiki/2024-10-03-Docker教程/ch10-1-快速打开终端","Quickly Open a Terminal in Docker","10.1",10010000,{"path":1247,"stem":1248,"title":1249,"date":1217,"chapter":1250,"chapterSort":1251,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch10-docker-shi-yong-you-hua","_i18n/en-us/wiki/2024-10-03-Docker教程/ch10-Docker使用优化","Docker Usage Optimization","10",10000000,{"path":1253,"stem":1254,"title":1255,"date":1217,"chapter":1256,"chapterSort":1257,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch2-an-zhuang-docker","_i18n/en-us/wiki/2024-10-03-Docker教程/ch2-安装Docker","Install Docker","2",2000000,{"path":1259,"stem":1260,"title":1261,"date":1217,"chapter":1262,"chapterSort":1263,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch3-docker-zhi-tong","_i18n/en-us/wiki/2024-10-03-Docker教程/ch3-Docker直通","Docker Passthrough","3",3000000,{"path":1265,"stem":1266,"title":1267,"date":1217,"chapter":1268,"chapterSort":1269,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch4-dockerhub-huan-yuan","_i18n/en-us/wiki/2024-10-03-Docker教程/ch4-DockerHub换源","DockerHub change source","4",4000000,{"path":1271,"stem":1272,"title":1273,"date":1217,"chapter":1274,"chapterSort":1275,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch5-docker-rong-qi-li-de-cheng-xu-de-tu-xing-jie-mian-tan-bu-chu-lai","_i18n/en-us/wiki/2024-10-03-Docker教程/ch5-docker容器里的程序的图形界面弹不出来","The graphical interface of the program inside the Docker container cannot be displayed.","5",5000000,{"path":1277,"stem":1278,"title":1279,"date":1217,"chapter":1280,"chapterSort":1281,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch6-docker-ming-ling-xue-xi","_i18n/en-us/wiki/2024-10-03-Docker教程/ch6-Docker命令学习","Learning Docker Commands","6",6000000,{"path":1283,"stem":1284,"title":1285,"date":1217,"chapter":1286,"chapterSort":1287,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch7-ge-zhong-docker-rong-qi-bu-shu","_i18n/en-us/wiki/2024-10-03-Docker教程/ch7-各种Docker容器部署","Deploying various Docker containers","7",7000000,{"path":1214,"stem":1231,"title":5,"date":1217,"chapter":1215,"chapterSort":1216,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},{"path":1290,"stem":1291,"title":1292,"date":1217,"chapter":1293,"chapterSort":1294,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":1224},"/en-us/wiki/2024-10-03-docker-jiao-cheng/ch9-vscode-yuan-cheng-kai-fa","_i18n/en-us/wiki/2024-10-03-Docker教程/ch9-VScode远程开发","VScode remote development","9",9000000,{"path":1220,"stem":1296,"title":1297,"date":1217,"chapter":1225,"chapterSort":1298,"docKey":1219,"docRoot":1220,"docTitle":1221,"isWikiDoc":96,"isWikiIndex":96},"_i18n/en-us/wiki/2024-10-03-Docker教程/index","Docker tutorial",0,{"variants":1300},[1301,1302,1305,1308,1311],{"path":1214,"localeSlug":1227,"i18nKey":1223},{"path":1303,"localeSlug":1304,"i18nKey":1223},"/zh-hant/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","zh-hant",{"path":1306,"localeSlug":1307,"i18nKey":1223},"/zh-hk/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","zh-hk",{"path":1309,"localeSlug":1310,"i18nKey":1223},"/zh-tw/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","zh-tw",{"path":1312,"localeSlug":1313,"i18nKey":1223},"/zh-cn/wiki/2024-10-03-docker-jiao-cheng/ch8-shou-dong-chuang-jian-docker-jing-xiang","zh-cn",[1214,1230,1303,1230,1306,1230,1309,1230,1312,1230],1780671794832]