Docker Windows: Difference between revisions

From Corat Coret
(Created page with "=Shortcuts= Lokasi installasi dari windows explorer <pre> \\ws.localhost\Ubuntu </pre> Dari powershell <pre> cd \\wsl$\Ubuntu </pre>")
 
 
Line 1: Line 1:
=Shortcuts=
=Install=


Lokasi installasi dari windows explorer
Menggunakan WSL2
<pre>
\\ws.localhost\Ubuntu
</pre>


Dari powershell
==Install CURL==
<pre>
<syntaxhighlight lang="bash">
cd \\wsl$\Ubuntu
sudo apt install -y curl
</pre>
</syntaxhighlight>
 
==Install Docker via shell script==
<syntaxhighlight lang="bash">
curl -s https://raw.githubusercontent.com/karaage0703/ubuntu-setup/master/install-docker.sh | /bin/bash
</syntaxhighlight>
 
<syntaxhighlight lang="bash">
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo apt-get -y install docker-compose-plugin
sudo gpasswd -a $USER docker
</syntaxhighlight>
 
==Jalankan docker pada WSL2==
<syntaxhighlight lang="bash">
sudo service docker start
</syntaxhighlight>

Latest revision as of 15:52, 18 June 2024

Install

Menggunakan WSL2

Install CURL

sudo apt install -y curl

Install Docker via shell script

curl -s https://raw.githubusercontent.com/karaage0703/ubuntu-setup/master/install-docker.sh | /bin/bash
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
sudo apt-get -y install docker-compose-plugin
sudo gpasswd -a $USER docker

Jalankan docker pada WSL2

sudo service docker start