From dcc411120f719dd9599ec597f6970e2e41988ba3 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Sat, 10 Aug 2024 09:14:48 +0200 Subject: [PATCH 1/2] Setup docker to use without sudo on WSL/Ubuntu --- _partials/es/ubuntu_docker.md | 19 +++++++++++-------- _partials/es/win_docker.md | 29 +++++++++++++++++++++++++++++ _partials/ubuntu_docker.md | 19 +++++++++++-------- _partials/win_docker.md | 28 ++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 16 deletions(-) diff --git a/_partials/es/ubuntu_docker.md b/_partials/es/ubuntu_docker.md index d5cd9cd5..e16401c3 100644 --- a/_partials/es/ubuntu_docker.md +++ b/_partials/es/ubuntu_docker.md @@ -10,15 +10,22 @@ Ve a la [documentación de instalación de Docker](https://docs.docker.com/engin Luego sigue las instrucciones del tutorial para instalar Docker **usando el repositorio**. Hay 2 pasos: -- SET UP THE REPOSITORY. Esto significa configurar el repositorio -- INSTALL DOCKER ENGINE. Esto significa instalar el motor de Docker +1. Set up Docker's apt repository. > Esto significa configurar el repositorio +2. Install the Docker packages. > Esto significa instalar el motor de Docker -Cuando termines, podrás ejecutar lo siguiente: +Ahora, asegurémonos de que podemos ejecutar `docker` sin `sudo`. + +Ejecute los siguientes comandos uno por uno: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +Cuando termines, podrás ejecutar lo siguiente: + ```bash sudo docker run hello-world ``` @@ -26,7 +33,3 @@ sudo docker run hello-world Debería aparecer el siguiente mensaje: ![](images/docker_hello.png) - -```bash -sudo service docker stop -``` diff --git a/_partials/es/win_docker.md b/_partials/es/win_docker.md index 0c3a09cc..a1a56019 100644 --- a/_partials/es/win_docker.md +++ b/_partials/es/win_docker.md @@ -21,3 +21,32 @@ docker run hello-world Debería aparecer el siguiente mensaje: ![](images/docker_hello.png) + +
+ Permission denied? (WSL / Ubuntu) + +Ejecute los siguientes comandos uno por uno: + +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +``` + +Intente `docker info` nuevamente. + +¿Ve este error? + +``` +WARNING: Error loading config file: /home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied`? +``` + +Ejecute el siguiente comando: + +```bash +sudo rm -rf ~/.docker/ +``` + +Intente `docker info` nuevamente. + +
diff --git a/_partials/ubuntu_docker.md b/_partials/ubuntu_docker.md index 6beebe97..c186844f 100644 --- a/_partials/ubuntu_docker.md +++ b/_partials/ubuntu_docker.md @@ -10,15 +10,22 @@ Go to [Docker install documentation](https://docs.docker.com/engine/install/ubun Then follow the tutorial instructions to install Docker **using the repository**. There are 2 steps: -- SET UP THE REPOSITORY -- INSTALL DOCKER ENGINE +1. Set up Docker's apt repository. +2. Install the Docker packages. -Once done, you should be able to run: +Now, let's make sure we can run `docker` without `sudo`. + +Run the following commands one by one: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +When finished, run the following command: + ```bash sudo docker run hello-world ``` @@ -26,7 +33,3 @@ sudo docker run hello-world The following message should print: ![](images/docker_hello.png) - -```bash -sudo service docker stop -``` diff --git a/_partials/win_docker.md b/_partials/win_docker.md index f8f44cfe..326b4fa4 100644 --- a/_partials/win_docker.md +++ b/_partials/win_docker.md @@ -21,3 +21,31 @@ docker run hello-world The following message should print: ![](images/docker_hello.png) + +
+ Permission denied? + +Run the following commands one by one: + +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +``` + +Try `docker run hello-world` again. + +Seeing this error? +``` +WARNING: Error loading config file: /home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied`? +``` + +Run the following command: + +```bash +sudo rm -rf ~/.docker/ +``` + +Try `docker run hello-world` again. + +
From 8d5177af0cc0b2998c94c5788549d21128671756 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 10 Aug 2024 07:15:21 +0000 Subject: [PATCH 2/2] setup guides generated --- LINUX.es.md | 19 +++++++++++-------- LINUX.md | 19 +++++++++++-------- VM.es.md | 19 +++++++++++-------- VM.md | 19 +++++++++++-------- WINDOWS.es.md | 29 +++++++++++++++++++++++++++++ WINDOWS.md | 28 ++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 32 deletions(-) diff --git a/LINUX.es.md b/LINUX.es.md index e7ee9e2d..4f329f91 100644 --- a/LINUX.es.md +++ b/LINUX.es.md @@ -694,15 +694,22 @@ Ve a la [documentación de instalación de Docker](https://docs.docker.com/engin Luego sigue las instrucciones del tutorial para instalar Docker **usando el repositorio**. Hay 2 pasos: -- SET UP THE REPOSITORY. Esto significa configurar el repositorio -- INSTALL DOCKER ENGINE. Esto significa instalar el motor de Docker +1. Set up Docker's apt repository. > Esto significa configurar el repositorio +2. Install the Docker packages. > Esto significa instalar el motor de Docker -Cuando termines, podrás ejecutar lo siguiente: +Ahora, asegurémonos de que podemos ejecutar `docker` sin `sudo`. + +Ejecute los siguientes comandos uno por uno: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +Cuando termines, podrás ejecutar lo siguiente: + ```bash sudo docker run hello-world ``` @@ -711,10 +718,6 @@ Debería aparecer el siguiente mensaje: ![](images/docker_hello.png) -```bash -sudo service docker stop -``` - ## Configuración de Google Cloud Platform diff --git a/LINUX.md b/LINUX.md index 530794b1..b7784c50 100644 --- a/LINUX.md +++ b/LINUX.md @@ -736,15 +736,22 @@ Go to [Docker install documentation](https://docs.docker.com/engine/install/ubun Then follow the tutorial instructions to install Docker **using the repository**. There are 2 steps: -- SET UP THE REPOSITORY -- INSTALL DOCKER ENGINE +1. Set up Docker's apt repository. +2. Install the Docker packages. -Once done, you should be able to run: +Now, let's make sure we can run `docker` without `sudo`. + +Run the following commands one by one: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +When finished, run the following command: + ```bash sudo docker run hello-world ``` @@ -753,10 +760,6 @@ The following message should print: ![](images/docker_hello.png) -```bash -sudo service docker stop -``` - ## Google Cloud Platform setup diff --git a/VM.es.md b/VM.es.md index 2a1a9ce6..392dfaef 100644 --- a/VM.es.md +++ b/VM.es.md @@ -820,15 +820,22 @@ Ve a la [documentación de instalación de Docker](https://docs.docker.com/engin Luego sigue las instrucciones del tutorial para instalar Docker **usando el repositorio**. Hay 2 pasos: -- SET UP THE REPOSITORY. Esto significa configurar el repositorio -- INSTALL DOCKER ENGINE. Esto significa instalar el motor de Docker +1. Set up Docker's apt repository. > Esto significa configurar el repositorio +2. Install the Docker packages. > Esto significa instalar el motor de Docker -Cuando termines, podrás ejecutar lo siguiente: +Ahora, asegurémonos de que podemos ejecutar `docker` sin `sudo`. + +Ejecute los siguientes comandos uno por uno: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +Cuando termines, podrás ejecutar lo siguiente: + ```bash sudo docker run hello-world ``` @@ -837,10 +844,6 @@ Debería aparecer el siguiente mensaje: ![](images/docker_hello.png) -```bash -sudo service docker stop -``` - ## Kitt diff --git a/VM.md b/VM.md index 12914264..a798e92e 100644 --- a/VM.md +++ b/VM.md @@ -1116,15 +1116,22 @@ Go to [Docker install documentation](https://docs.docker.com/engine/install/ubun Then follow the tutorial instructions to install Docker **using the repository**. There are 2 steps: -- SET UP THE REPOSITORY -- INSTALL DOCKER ENGINE +1. Set up Docker's apt repository. +2. Install the Docker packages. -Once done, you should be able to run: +Now, let's make sure we can run `docker` without `sudo`. + +Run the following commands one by one: ```bash -sudo service docker start +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +sudo rm -rf ~/.docker/ ``` +When finished, run the following command: + ```bash sudo docker run hello-world ``` @@ -1133,10 +1140,6 @@ The following message should print: ![](images/docker_hello.png) -```bash -sudo service docker stop -``` - ## Kitt diff --git a/WINDOWS.es.md b/WINDOWS.es.md index 50f2d0b7..49e63056 100644 --- a/WINDOWS.es.md +++ b/WINDOWS.es.md @@ -1348,6 +1348,35 @@ Debería aparecer el siguiente mensaje: ![](images/docker_hello.png) +
+ Permission denied? (WSL / Ubuntu) + +Ejecute los siguientes comandos uno por uno: + +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +``` + +Intente `docker info` nuevamente. + +¿Ve este error? + +``` +WARNING: Error loading config file: /home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied`? +``` + +Ejecute el siguiente comando: + +```bash +sudo rm -rf ~/.docker/ +``` + +Intente `docker info` nuevamente. + +
+ ## Configuración de Google Cloud Platform diff --git a/WINDOWS.md b/WINDOWS.md index 26aad418..5faaa5a8 100644 --- a/WINDOWS.md +++ b/WINDOWS.md @@ -1409,6 +1409,34 @@ The following message should print: ![](images/docker_hello.png) +
+ Permission denied? + +Run the following commands one by one: + +```bash +sudo groupadd docker +sudo usermod -aG docker $USER +newgrp docker +``` + +Try `docker run hello-world` again. + +Seeing this error? +``` +WARNING: Error loading config file: /home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied`? +``` + +Run the following command: + +```bash +sudo rm -rf ~/.docker/ +``` + +Try `docker run hello-world` again. + +
+ ## Google Cloud Platform setup