PHOTO-2022-08-06-13-39-03

How to install Docker Engine on Alpine Linux – H2S Media

Docker is a popular container platform to run virtualized lightweight machines. Here we learn how to install Docker Engine and Compose on Alpine Linux using simple commands to run Containers.
Alpine Linux is popular for its lightweight, security, and performance, hence widely used for installing Docker for creating containers using various Images available on Docker Hub. If you are an Alpine user and want to know how to use this container platform on Linux, here are the steps to follow.
Contents
First, on the command line of this Linux, run the system update command to refresh the repository cache.
 
The packages to install Docker are already in the repository of Alpine Linux, hence we don’t need to add anything. Just use the APK package manager and install the required packages.
 
By default, the Docker service is not activated to run by the system automatically with every boot. Hence we have to do that manually, here are the commands to follow.
//<![CDATA[
(function(){for(var g="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,k=["String","prototype","repeat"],l=0;lb||1342177279>>=1)c+=c;return a};q!=p&&null!=q&&g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(“.”),d=t;a[0]in d||!d.execScript||d.execScript(“var “+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0<c){for(var a=Array(c),d=0;d=c.offsetWidth&&0>=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+(“pageYOffset”in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(“pageXOffset”in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+”,”+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.g.height&&d<=b.g.width)}a&&(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&z(this,b)};u("pagespeed.CriticalImages.checkImageForCriticality",function(b){x.checkImageForCriticality(b)});u("pagespeed.CriticalImages.checkCriticalImages",function(){A(x)});function A(b){b.b={};for(var c=["IMG","INPUT"],a=[],d=0;d<c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&&a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a="oh="+b.l;b.f&&(a+="&n="+b.f);if(c=!!b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),d=1;d=a.length+e.length&&(a+=e)}b.i&&(e=”&rd=”+encodeURIComponent(JSON.stringify(B())),131072>=a.length+e.length&&(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(“Msxml2.XMLHTTP”)}catch(r){try{f=new ActiveXObject(“Microsoft.XMLHTTP”)}catch(D){}}f&&(f.open(“POST”,d+(-1==d.indexOf(“?”)?”?”:”&”)+”url=”+encodeURIComponent(b)),f.setRequestHeader(“Content-Type”,”application/x-www-form-urlencoded”),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(“IMG”);if(!c.length)return{};var a=c[0];if(!(“naturalWidth”in a&&”naturalHeight”in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(“data-pagespeed-url-hash”);e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0
=b[e].o&&a.height>=b[e].m)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=””;u(“pagespeed.CriticalImages.getBeaconData”,function(){return C});u(“pagespeed.CriticalImages.Run”,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&&w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run(‘/mod_pagespeed_beacon’,’http://www.how2shout.com/linux/how-to-install-docker-engine-on-alpine-linux/’,’Eu877fTLHi’,true,false,’sbCX2_Te5hg’);
//]]>Enable and start Docker service on Alpine Linux

 
If you are using any user other than root then you have to use sudo with every command of docker. To remove this inconvenience, you can add your system user to the Docker’s group.
 
Now, let’s test whether everything is working absolutely fine and would we be able to create containers or not. To check, here we are downloading the Ubuntu docker image to create a container for that.
Create container:
Start Container:
Switch and Access the installed Ubuntu Container root user:
Stop container:
Remove container
Test Docker on Alpine Linux
 
 
Heyan Maurya Ubuntu

Heyan Maurya Linux, Ubuntu

Heyan Maurya Linux

Heyan Maurya Linux

Ready to use Alpine Linux with docker: https://github.com/Mexit/AlpDock

document.getElementById(“ak_js”).setAttribute(“value”,(new Date()).getTime());
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Linux Shout crafted as a part of our main portal H2S Media to publish Linux related tutorials and open source Software.

source

Leave a Reply

Your email address will not be published. Required fields are marked *