diff --git a/contrib/android/Readme.md b/contrib/android/Readme.md index 9ecaebd26..a5a0b4d35 100644 --- a/contrib/android/Readme.md +++ b/contrib/android/Readme.md @@ -13,12 +13,7 @@ similar system. 1. Install Docker - ``` - $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - $ sudo apt-get update - $ sudo apt-get install -y docker-ce - ``` + See `contrib/docker_notes.md`. 2. Build binaries diff --git a/contrib/build-linux/appimage/README.md b/contrib/build-linux/appimage/README.md index 838777b87..7680aafc6 100644 --- a/contrib/build-linux/appimage/README.md +++ b/contrib/build-linux/appimage/README.md @@ -14,12 +14,7 @@ see [issue #5159](https://github.com/spesmilo/electrum/issues/5159). 1. Install Docker - ``` - $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - $ sudo apt-get update - $ sudo apt-get install -y docker-ce - ``` + See `contrib/docker_notes.md`. 2. Build binary diff --git a/contrib/build-linux/sdist/README.md b/contrib/build-linux/sdist/README.md index 2ff3ed011..96f8bb82b 100644 --- a/contrib/build-linux/sdist/README.md +++ b/contrib/build-linux/sdist/README.md @@ -9,12 +9,7 @@ similar system. 1. Install Docker - ``` - $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - $ sudo apt-get update - $ sudo apt-get install -y docker-ce - ``` + See `contrib/docker_notes.md`. 2. Build source tarball diff --git a/contrib/build-wine/README.md b/contrib/build-wine/README.md index 61fdf205d..617dd9b12 100644 --- a/contrib/build-wine/README.md +++ b/contrib/build-wine/README.md @@ -9,12 +9,7 @@ similar system. 1. Install Docker - ``` - $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - $ sudo apt-get update - $ sudo apt-get install -y docker-ce - ``` + See `contrib/docker_notes.md`. Note: older versions of Docker might not work well (see [#6971](https://github.com/spesmilo/electrum/issues/6971)). diff --git a/contrib/docker_notes.md b/contrib/docker_notes.md new file mode 100644 index 000000000..e1ab3b8a7 --- /dev/null +++ b/contrib/docker_notes.md @@ -0,0 +1,21 @@ +# Notes about using Docker in the build scripts + +- To install Docker: + + This assumes an Ubuntu (x86_64) host, but it should not be too hard to adapt to another similar system. + + ``` + $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + $ sudo apt-get update + $ sudo apt-get install -y docker-ce + ``` + +- To communicate with the docker daemon, the build scripts either need to be called via sudo, + or the unix user on the host system (e.g. the user you run as) needs to be + part of the `docker` group. i.e.: + ``` + $ sudo usermod -aG docker ${USER} + ``` + (and then reboot or similar for it to take effect) +