From f6a4df03bbf05f89abf4ac0e9fcfd099641d1811 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 14 Dec 2019 10:04:33 +0100 Subject: [PATCH] new: [README.org] add docker-toolbox-for-mac support Signed-off-by: Valentin Lab --- README.org | 47 ++++++++++++++++++++++++++++++++++++++++------- src/install.sh | 11 ++++++++--- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/README.org b/README.org index 698a982..31d5c97 100644 --- a/README.org +++ b/README.org @@ -60,23 +60,54 @@ curl -sS https://git.myceliandre.fr/Lokavaluto/dev-pack/raw/branch/dev/src/insta If you are curious of what it is doing, check: -https://git.myceliandre.fr/Lokavaluto/dev-pack/src/branch/dev/src/install.sh#L203-L258 +https://git.myceliandre.fr/Lokavaluto/dev-pack/src/branch/dev/src/install.sh#L252-L273 *** MacOSX -We are using =compose=, and installation process will download -=compose= binary, and our =charm-store=. +There are 2 ways to get docker on mac: +- docker desktop for mac +- docker toolbox for mac (obsolete, but works with older macs) -**** Requirements +They are basically described here: + +https://docs.docker.com/docker-for-mac/docker-toolbox/ + +**** Docker Desktop for mac + + We are using =compose=, and installation process will download + =compose= binary, and our =charm-store=. + +***** Requirements + + On MacOSX, you'll need to install homebrew and gnu tools: + + https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ + +***** TODO Deployment -On MacOSX, you'll need to install homebrew and gnu tools: +**** Docker Toolbox for mac -https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ +This docker installs will create a virtualbox with a linux inside. +Your =/Users= will be automatically mapped into your virtualbox linux VM. +***** Requirements + +You'll not need anything more than the Docker Toolbox for mac installed. + +This link will help you with that: +https://docs.docker.com/toolbox/toolbox_install_mac/ -**** TODO Deployment +***** Deployment +We have a magic script for you that will install or update your +current installation of =compose= and of the =charms=. + +You need to run this code in the bash of your Virtualbox + +#+BEGIN_SRC shell +curl -sS https://git.myceliandre.fr/Lokavaluto/dev-pack/raw/branch/dev/src/install.sh | bash +#+END_SRC *** Windows @@ -136,6 +167,7 @@ cat < compose.yml odoo: charm: odoo-tecnativa docker-compose: + #image: docker.0k.io/mirror/odoo:rc_12.0-MYC-INIT image: docker.0k.io/mirror/odoo:rc_13.0-MYC-INIT ## Important to keep as a list: otherwise it'll overwrite charm's arguments. #command: @@ -255,6 +287,7 @@ services: PGHOST: postgres PGPASSWORD: \${PG_PASS} PGUSER: \${PG_USER} + #image: docker.0k.io/mirror/odoo:rc_12.0-MYC-INIT image: docker.0k.io/mirror/odoo:rc_13.0-MYC-INIT links: - postgres diff --git a/src/install.sh b/src/install.sh index 5ac313b..dacedf9 100644 --- a/src/install.sh +++ b/src/install.sh @@ -146,6 +146,7 @@ depends() { done } + get_os() { local uname_output uname_output="$(uname -s)" @@ -155,6 +156,8 @@ get_os() { e wsl elif [[ "$(< /proc/version)" =~ ^.*-microsoft-.*$ ]]; then e wsl2 + elif [[ "$(< /proc/version)" == *-boot2docker* ]] && [[ -d /Users ]]; then + e docker-toolbox-for-mac else e linux fi @@ -315,11 +318,13 @@ install.linux() { } -install.mac() { - depends docker - die "Not implemented yet." + + +install.docker-toolbox-for-mac() { + install.linux } + install.wsl() { CHARM_PATH=~/.charm-store get_charm_store || return 1