[{"data":1,"prerenderedAt":896},["ShallowReactive",2],{"i-lucide:sun-moon":3,"i-lucide:menu":8,"post-\u002Fblog\u002F2022-12-01-installing-docker-on-debian":10,"surround-\u002Fblog\u002F2022-12-01-installing-docker-on-debian":879,"i-lucide:arrow-left":890,"i-lucide:sparkles":892,"i-lucide:user":894},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 2v2m2.837 12.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715M16 12a4 4 0 0 0-4-4m7-3l-1.256 1.256M20 12h2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"id":11,"title":12,"authors":13,"body":16,"date":864,"description":26,"extension":865,"meta":866,"navigation":422,"path":869,"seo":870,"stem":871,"tags":872,"toc":422,"__hash__":878},"blog\u002Fblog\u002F2022-12-01-installing-docker-on-debian.md","Installing Docker on Debian 11",[14,15],"gpt","pfarmer",{"type":17,"value":18,"toc":848},"minimark",[19,30,35,59,63,104,130,134,139,207,211,266,273,337,341,349,362,366,394,398,823,830,844],[20,21,22,26,27],"p",{},[23,24],"binding",{"value":25},"\u003C info >","This should work as-is with Debian 12.",[23,28],{"value":29},"\u003C \u002Finfo >",[31,32,34],"h2",{"id":33},"prerequisites","Prerequisites",[36,37,38,42],"ul",{},[39,40,41],"li",{},"Debian 11 (Bullseye)",[39,43,44,45],{},"One of the following architectures;\n",[36,46,47,50,53,56],{},[39,48,49],{},"x86_64",[39,51,52],{},"amd64",[39,54,55],{},"armhf",[39,57,58],{},"arm64",[31,60,62],{"id":61},"remove-any-previously-installed-versions-of-docker","Remove any previously installed versions of Docker",[64,65,70],"pre",{"className":66,"code":67,"language":68,"meta":69,"style":69},"language-shell shiki shiki-themes github-light github-dark-default","sudo apt-get remove docker docker-engine docker.io containerd runc\n","shell","",[71,72,73],"code",{"__ignoreMap":69},[74,75,78,82,86,89,92,95,98,101],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"sYRkA","sudo",[74,83,85],{"class":84},"sNbzA"," apt-get",[74,87,88],{"class":84}," remove",[74,90,91],{"class":84}," docker",[74,93,94],{"class":84}," docker-engine",[74,96,97],{"class":84}," docker.io",[74,99,100],{"class":84}," containerd",[74,102,103],{"class":84}," runc\n",[20,105,106,109,110,113,114,117,120,123,124,126,127],{},[23,107],{"value":108},"\u003C warning >","If you've had docker previously installed and would like a completely fresh start, it would be a good idea to cleanup the images, containers, volumes and networks, these are stored in ",[71,111,112],{},"\u002Fvar\u002Flib\u002Fdocker",". ",[23,115],{"value":116},"\u003C \u002Fwarning >",[23,118],{"value":119},"\u003C danger >",[71,121,122],{},"sudo rm -rf \u002Fvar\u002Flib\u002Fdocker"," will do the job, but will delete everything in ",[71,125,112],{},".",[23,128],{"value":129},"\u003C \u002Fdanger >",[31,131,133],{"id":132},"register-the-official-docker-apt-repo","Register the official docker apt repo",[135,136,138],"h3",{"id":137},"make-sure-debian-is-upto-date","Make sure debian is upto date",[64,140,142],{"className":66,"code":141,"language":68,"meta":69,"style":69},"sudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install \\\n    ca-certificates \\\n    curl \\\n    gnupg \\\n    lsb-release\n",[71,143,144,153,163,177,185,193,201],{"__ignoreMap":69},[74,145,146,148,150],{"class":76,"line":77},[74,147,81],{"class":80},[74,149,85],{"class":84},[74,151,152],{"class":84}," update\n",[74,154,156,158,160],{"class":76,"line":155},2,[74,157,81],{"class":80},[74,159,85],{"class":84},[74,161,162],{"class":84}," upgrade\n",[74,164,166,168,170,173],{"class":76,"line":165},3,[74,167,81],{"class":80},[74,169,85],{"class":84},[74,171,172],{"class":84}," install",[74,174,176],{"class":175},"sw7DY"," \\\n",[74,178,180,183],{"class":76,"line":179},4,[74,181,182],{"class":84},"    ca-certificates",[74,184,176],{"class":175},[74,186,188,191],{"class":76,"line":187},5,[74,189,190],{"class":84},"    curl",[74,192,176],{"class":175},[74,194,196,199],{"class":76,"line":195},6,[74,197,198],{"class":84},"    gnupg",[74,200,176],{"class":175},[74,202,204],{"class":76,"line":203},7,[74,205,206],{"class":84},"    lsb-release\n",[135,208,210],{"id":209},"add-dockers-gpg-key","Add Docker's GPG key",[64,212,214],{"className":66,"code":213,"language":68,"meta":69,"style":69},"sudo mkdir -m 0755 -p \u002Fetc\u002Fapt\u002Fkeyrings\ncurl -fsSL https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fdebian\u002Fgpg | sudo gpg --dearmor -o \u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg\n",[71,215,216,236],{"__ignoreMap":69},[74,217,218,220,223,227,230,233],{"class":76,"line":77},[74,219,81],{"class":80},[74,221,222],{"class":84}," mkdir",[74,224,226],{"class":225},"sPgVT"," -m",[74,228,229],{"class":225}," 0755",[74,231,232],{"class":225}," -p",[74,234,235],{"class":84}," \u002Fetc\u002Fapt\u002Fkeyrings\n",[74,237,238,241,244,247,251,254,257,260,263],{"class":76,"line":155},[74,239,240],{"class":80},"curl",[74,242,243],{"class":225}," -fsSL",[74,245,246],{"class":84}," https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fdebian\u002Fgpg",[74,248,250],{"class":249},"sDgYj"," |",[74,252,253],{"class":80}," sudo",[74,255,256],{"class":84}," gpg",[74,258,259],{"class":225}," --dearmor",[74,261,262],{"class":225}," -o",[74,264,265],{"class":84}," \u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg\n",[135,267,269,270],{"id":268},"add-the-apt-repo-to-etcaptsourceslistd","Add the apt repo to ",[71,271,272],{},"\u002Fetc\u002Fapt\u002Fsources.list.d",[64,274,276],{"className":66,"code":275,"language":68,"meta":69,"style":69},"echo \\\n  \"deb [arch=$(dpkg --print-architecture) signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg] \\ \n  https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fdebian \\\n  $(lsb_release -cs) stable\" | sudo tee \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fdocker.list > \u002Fdev\u002Fnull\n",[71,277,278,285,299,307],{"__ignoreMap":69},[74,279,280,283],{"class":76,"line":77},[74,281,282],{"class":225},"echo",[74,284,176],{"class":175},[74,286,287,290,293,296],{"class":76,"line":155},[74,288,289],{"class":84},"  \"deb [arch=$(",[74,291,292],{"class":80},"dpkg",[74,294,295],{"class":225}," --print-architecture",[74,297,298],{"class":84},") signed-by=\u002Fetc\u002Fapt\u002Fkeyrings\u002Fdocker.gpg] \\ \n",[74,300,301,304],{"class":76,"line":165},[74,302,303],{"class":84},"  https:\u002F\u002Fdownload.docker.com\u002Flinux\u002Fdebian ",[74,305,306],{"class":175},"\\\n",[74,308,309,312,315,318,321,323,325,328,331,334],{"class":76,"line":179},[74,310,311],{"class":84},"  $(",[74,313,314],{"class":80},"lsb_release",[74,316,317],{"class":225}," -cs",[74,319,320],{"class":84},") stable\"",[74,322,250],{"class":249},[74,324,253],{"class":80},[74,326,327],{"class":84}," tee",[74,329,330],{"class":84}," \u002Fetc\u002Fapt\u002Fsources.list.d\u002Fdocker.list",[74,332,333],{"class":249}," >",[74,335,336],{"class":84}," \u002Fdev\u002Fnull\n",[31,338,340],{"id":339},"install-docker","Install Docker",[135,342,344,345,348],{"id":343},"update-the-apt-packge-files","Update the ",[71,346,347],{},"apt"," packge files",[64,350,352],{"className":66,"code":351,"language":68,"meta":69,"style":69},"sudo apt-get update\n",[71,353,354],{"__ignoreMap":69},[74,355,356,358,360],{"class":76,"line":77},[74,357,81],{"class":80},[74,359,85],{"class":84},[74,361,152],{"class":84},[135,363,365],{"id":364},"install-docker-containerd-and-docker-compose","Install Docker, containerd and Docker Compose",[64,367,369],{"className":66,"code":368,"language":68,"meta":69,"style":69},"sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n",[71,370,371],{"__ignoreMap":69},[74,372,373,375,377,379,382,385,388,391],{"class":76,"line":77},[74,374,81],{"class":80},[74,376,85],{"class":84},[74,378,172],{"class":84},[74,380,381],{"class":84}," docker-ce",[74,383,384],{"class":84}," docker-ce-cli",[74,386,387],{"class":84}," containerd.io",[74,389,390],{"class":84}," docker-buildx-plugin",[74,392,393],{"class":84}," docker-compose-plugin\n",[31,395,397],{"id":396},"test-everything-is-working","Test everything is working",[64,399,401],{"className":66,"code":400,"language":68,"meta":69,"style":69},"$ sudo docker run hello-world\n\n\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n\nTo generate this message, Docker took the following steps:\n 1. The Docker client contacted the Docker daemon.\n 2. The Docker daemon pulled the \"hello-world\" image from the Docker Hub.\n    (amd64)\n 3. The Docker daemon created a new container from that image which runs the\n    executable that produces the output you are currently reading.\n 4. The Docker daemon streamed that output to the Docker client, which sent it\n    to your terminal.\n\nTo try something more ambitious, you can run an Ubuntu container with:\n $ docker run -it ubuntu bash\n\nShare images, automate workflows, and more with a free Docker ID:\n https:\u002F\u002Fhub.docker.com\u002F\n\nFor more examples and ideas, visit:\n https:\u002F\u002Fdocs.docker.com\u002Fget-started\u002F\n",[71,402,403,418,424,428,439,474,478,507,531,564,576,615,643,679,690,695,730,749,754,787,793,798,817],{"__ignoreMap":69},[74,404,405,408,410,412,415],{"class":76,"line":77},[74,406,407],{"class":80},"$",[74,409,253],{"class":84},[74,411,91],{"class":84},[74,413,414],{"class":84}," run",[74,416,417],{"class":84}," hello-world\n",[74,419,420],{"class":76,"line":155},[74,421,423],{"emptyLinePlaceholder":422},true,"\n",[74,425,426],{"class":76,"line":165},[74,427,423],{"emptyLinePlaceholder":422},[74,429,430,433,436],{"class":76,"line":179},[74,431,432],{"class":80},"Hello",[74,434,435],{"class":84}," from",[74,437,438],{"class":84}," Docker!\n",[74,440,441,444,447,450,453,456,459,462,465,468,471],{"class":76,"line":187},[74,442,443],{"class":80},"This",[74,445,446],{"class":84}," message",[74,448,449],{"class":84}," shows",[74,451,452],{"class":84}," that",[74,454,455],{"class":84}," your",[74,457,458],{"class":84}," installation",[74,460,461],{"class":84}," appears",[74,463,464],{"class":84}," to",[74,466,467],{"class":84}," be",[74,469,470],{"class":84}," working",[74,472,473],{"class":84}," correctly.\n",[74,475,476],{"class":76,"line":195},[74,477,423],{"emptyLinePlaceholder":422},[74,479,480,483,486,489,492,495,498,501,504],{"class":76,"line":203},[74,481,482],{"class":80},"To",[74,484,485],{"class":84}," generate",[74,487,488],{"class":84}," this",[74,490,491],{"class":84}," message,",[74,493,494],{"class":84}," Docker",[74,496,497],{"class":84}," took",[74,499,500],{"class":84}," the",[74,502,503],{"class":84}," following",[74,505,506],{"class":84}," steps:\n",[74,508,510,513,516,518,521,524,526,528],{"class":76,"line":509},8,[74,511,512],{"class":80}," 1.",[74,514,515],{"class":84}," The",[74,517,494],{"class":84},[74,519,520],{"class":84}," client",[74,522,523],{"class":84}," contacted",[74,525,500],{"class":84},[74,527,494],{"class":84},[74,529,530],{"class":84}," daemon.\n",[74,532,534,537,539,541,544,547,549,552,555,557,559,561],{"class":76,"line":533},9,[74,535,536],{"class":80}," 2.",[74,538,515],{"class":84},[74,540,494],{"class":84},[74,542,543],{"class":84}," daemon",[74,545,546],{"class":84}," pulled",[74,548,500],{"class":84},[74,550,551],{"class":84}," \"hello-world\"",[74,553,554],{"class":84}," image",[74,556,435],{"class":84},[74,558,500],{"class":84},[74,560,494],{"class":84},[74,562,563],{"class":84}," Hub.\n",[74,565,567,571,573],{"class":76,"line":566},10,[74,568,570],{"class":569},"szmH1","    (",[74,572,52],{"class":80},[74,574,575],{"class":569},")\n",[74,577,579,582,584,586,588,591,594,597,600,602,604,606,609,612],{"class":76,"line":578},11,[74,580,581],{"class":80}," 3.",[74,583,515],{"class":84},[74,585,494],{"class":84},[74,587,543],{"class":84},[74,589,590],{"class":84}," created",[74,592,593],{"class":84}," a",[74,595,596],{"class":84}," new",[74,598,599],{"class":84}," container",[74,601,435],{"class":84},[74,603,452],{"class":84},[74,605,554],{"class":84},[74,607,608],{"class":84}," which",[74,610,611],{"class":84}," runs",[74,613,614],{"class":84}," the\n",[74,616,618,621,623,626,628,631,634,637,640],{"class":76,"line":617},12,[74,619,620],{"class":80},"    executable",[74,622,452],{"class":84},[74,624,625],{"class":84}," produces",[74,627,500],{"class":84},[74,629,630],{"class":84}," output",[74,632,633],{"class":84}," you",[74,635,636],{"class":84}," are",[74,638,639],{"class":84}," currently",[74,641,642],{"class":84}," reading.\n",[74,644,646,649,651,653,655,658,660,662,664,666,668,671,673,676],{"class":76,"line":645},13,[74,647,648],{"class":80}," 4.",[74,650,515],{"class":84},[74,652,494],{"class":84},[74,654,543],{"class":84},[74,656,657],{"class":84}," streamed",[74,659,452],{"class":84},[74,661,630],{"class":84},[74,663,464],{"class":84},[74,665,500],{"class":84},[74,667,494],{"class":84},[74,669,670],{"class":84}," client,",[74,672,608],{"class":84},[74,674,675],{"class":84}," sent",[74,677,678],{"class":84}," it\n",[74,680,682,685,687],{"class":76,"line":681},14,[74,683,684],{"class":80},"    to",[74,686,455],{"class":84},[74,688,689],{"class":84}," terminal.\n",[74,691,693],{"class":76,"line":692},15,[74,694,423],{"emptyLinePlaceholder":422},[74,696,698,700,703,706,709,712,714,717,719,722,725,727],{"class":76,"line":697},16,[74,699,482],{"class":80},[74,701,702],{"class":84}," try",[74,704,705],{"class":84}," something",[74,707,708],{"class":84}," more",[74,710,711],{"class":84}," ambitious,",[74,713,633],{"class":84},[74,715,716],{"class":84}," can",[74,718,414],{"class":84},[74,720,721],{"class":84}," an",[74,723,724],{"class":84}," Ubuntu",[74,726,599],{"class":84},[74,728,729],{"class":84}," with:\n",[74,731,733,736,738,740,743,746],{"class":76,"line":732},17,[74,734,735],{"class":80}," $",[74,737,91],{"class":84},[74,739,414],{"class":84},[74,741,742],{"class":225}," -it",[74,744,745],{"class":84}," ubuntu",[74,747,748],{"class":84}," bash\n",[74,750,752],{"class":76,"line":751},18,[74,753,423],{"emptyLinePlaceholder":422},[74,755,757,760,763,766,769,772,774,777,779,782,784],{"class":76,"line":756},19,[74,758,759],{"class":80},"Share",[74,761,762],{"class":84}," images,",[74,764,765],{"class":84}," automate",[74,767,768],{"class":84}," workflows,",[74,770,771],{"class":84}," and",[74,773,708],{"class":84},[74,775,776],{"class":84}," with",[74,778,593],{"class":84},[74,780,781],{"class":84}," free",[74,783,494],{"class":84},[74,785,786],{"class":84}," ID:\n",[74,788,790],{"class":76,"line":789},20,[74,791,792],{"class":80}," https:\u002F\u002Fhub.docker.com\u002F\n",[74,794,796],{"class":76,"line":795},21,[74,797,423],{"emptyLinePlaceholder":422},[74,799,801,804,806,809,811,814],{"class":76,"line":800},22,[74,802,803],{"class":80},"For",[74,805,708],{"class":84},[74,807,808],{"class":84}," examples",[74,810,771],{"class":84},[74,812,813],{"class":84}," ideas,",[74,815,816],{"class":84}," visit:\n",[74,818,820],{"class":76,"line":819},23,[74,821,822],{"class":80}," https:\u002F\u002Fdocs.docker.com\u002Fget-started\u002F\n",[20,824,825,826,829],{},"If you see the above message from running ",[71,827,828],{},"sudo docker run hello-world",", docker has been installed correctly and is now ready to start hosting containers for you.",[20,831,832,834,835,837,838,841,842],{},[23,833],{"value":25},"Optionally, you can add yourself to the docker group, so you don't have to use ",[71,836,81],{}," each time you want to run a docker command.\n",[71,839,840],{},"sudo usermod -a -G docker YOUR_USERNAME"," will do the job.",[23,843],{"value":29},[845,846,847],"style",{},"html pre.shiki code .sYRkA, html code.shiki .sYRkA{--shiki-default:#6F42C1;--shiki-dark:#FFA657}html pre.shiki code .sNbzA, html code.shiki .sNbzA{--shiki-default:#032F62;--shiki-dark:#A5D6FF}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 .sw7DY, html code.shiki .sw7DY{--shiki-default:#005CC5;--shiki-dark:#FF7B72}html pre.shiki code .sPgVT, html code.shiki .sPgVT{--shiki-default:#005CC5;--shiki-dark:#79C0FF}html pre.shiki code .sDgYj, html code.shiki .sDgYj{--shiki-default:#D73A49;--shiki-dark:#FF7B72}html pre.shiki code .szmH1, html code.shiki .szmH1{--shiki-default:#24292E;--shiki-dark:#E6EDF3}",{"title":69,"searchDepth":155,"depth":155,"links":849},[850,851,852,858,863],{"id":33,"depth":155,"text":34},{"id":61,"depth":155,"text":62},{"id":132,"depth":155,"text":133,"children":853},[854,855,856],{"id":137,"depth":165,"text":138},{"id":209,"depth":165,"text":210},{"id":268,"depth":165,"text":857},"Add the apt repo to \u002Fetc\u002Fapt\u002Fsources.list.d",{"id":339,"depth":155,"text":340,"children":859},[860,862],{"id":343,"depth":165,"text":861},"Update the apt packge files",{"id":364,"depth":165,"text":365},{"id":396,"depth":155,"text":397},"2022-12-01","md",{"type":867,"layout":868},"post","blog_page","\u002Fblog\u002F2022-12-01-installing-docker-on-debian",{"title":12,"description":26},"blog\u002F2022-12-01-installing-docker-on-debian",[873,874,875,876,877],"debian","docker","sysadmin","devops","linux","YWQdGGM_v5ai-mTw5RvQucesa6gQoB_cKkSFMXzUyx0",[880,885],{"title":881,"path":882,"stem":883,"date":884,"children":-1},"Securing SSH with ssh keys","\u002Fblog\u002F2022-11-23-securing-ssh","blog\u002F2022-11-23-securing-ssh","2022-11-23",{"title":886,"path":887,"stem":888,"date":889,"children":-1},"Running Traefik in Docker","\u002Fblog\u002F2022-12-09-running-traefik","blog\u002F2022-12-09-running-traefik","2022-12-09",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":891},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":893},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4\"\u002F>\u003Ccircle cx=\"4\" cy=\"20\" r=\"2\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":895},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"\u002F>\u003Ccircle cx=\"12\" cy=\"7\" r=\"4\"\u002F>\u003C\u002Fg>",1783616166392]