From f139242e54243aa4ff700d3fe4acec363ea0c2b6 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Fri, 13 Dec 2019 18:59:44 +0100 Subject: [PATCH] new: [README.org] add WSL2 instruction Signed-off-by: Valentin Lab --- README.org | 32 ++++++++++++++++++++++++-------- src/install.sh | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/README.org b/README.org index f2aaf70..698a982 100644 --- a/README.org +++ b/README.org @@ -79,27 +79,39 @@ https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in -*** Windows - docker for windows +*** Windows -There are many ways to use docker on windows. +There are different ways to run docker on windows, the preferred is on +WSL2 with a native docker daemon running in the WSL2 environment. -If you intend to use docker for windows, then you wont be able to use -our tool =compose= for the moment. However you can use the full blown +But this is still not out, so you might prefer to run "Docker For +Windows". In that latter case you won't be able to use our tool +=compose= for the moment. However you can use the full blown =docker-compose= method. +**** Windows - docker for windows -**** Requirements +***** Requirements - =bash= >= 4.3 - =docker= >= 17.06 - =docker-compose= -**** Deployment +***** Deployment You'll need to get our charms if you want to use our same postgres image. -This script will take care of what you need: +This script will take care of what you need if run from a bash in WSL: + +#+BEGIN_SRC shell +curl -sS https://git.myceliandre.fr/Lokavaluto/dev-pack/raw/branch/dev/src/install.sh | bash +#+END_SRC + + +**** Windows - docker in WSL2 + +Just run this script in a bash session under WSL2: #+BEGIN_SRC shell curl -sS https://git.myceliandre.fr/Lokavaluto/dev-pack/raw/branch/dev/src/install.sh | bash @@ -110,10 +122,14 @@ curl -sS https://git.myceliandre.fr/Lokavaluto/dev-pack/raw/branch/dev/src/insta *** using =compose= +This method only works if you are on linux, MacOSX, or Windows WSL2 +with docker installed inside WSL2. + You need to create a =compose.yml= that suits your need. You can create it wherever you want as long as either you launch =compose= in a sub-directory or you specify the location of the =compose= file with -the =-f COMPOSEFILE= option. Here's a good start: +the =-f COMPOSEFILE= option. Here's a good start, execute these command +in a shell: #+BEGIN_SRC shell cat < compose.yml diff --git a/src/install.sh b/src/install.sh index efd7c39..5ac313b 100644 --- a/src/install.sh +++ b/src/install.sh @@ -153,7 +153,7 @@ get_os() { Linux*) if [[ "$(< /proc/version)" =~ ^.*@(Microsoft|WSL).*$ ]]; then e wsl - elif [[ "$(< /proc/version)" =~ ^.*-microsoft-*$ ]]; then + elif [[ "$(< /proc/version)" =~ ^.*-microsoft-.*$ ]]; then e wsl2 else e linux