From a2dac50f256a42cfc646e12feaf803a35866fca7 Mon Sep 17 00:00:00 2001 From: Gabe O'Brien Date: Fri, 22 Oct 2021 11:35:22 -0700 Subject: [PATCH 1/3] docs: adds documentation on how to setup Docker on OSX using Minikube --- DockerSetupOSX.md | 35 +++++++++++++++++++++++++++++++++++ README.md | 18 +++++++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 DockerSetupOSX.md diff --git a/DockerSetupOSX.md b/DockerSetupOSX.md new file mode 100644 index 0000000..5da1848 --- /dev/null +++ b/DockerSetupOSX.md @@ -0,0 +1,35 @@ +# Docker Desktop replacement + +Docker Desktop has changed their license and require payment for most use cases. This document will outline a drop in replacement for Docker Desktop (minus the actual desktop interface). + +## minikube + +Minikube allows for easily running a Kubernetes cluster locally and will work for normal Docker use cases as well. + +Currently there is an issue running with the default (hyperkit) driver. To get around this issue virtualbox will be the drive or choice. + +## Install virtual box + +Installing virutalbox will require granting permission and restarting. + + brew install virtualbox + +## Start docker with virtual box + +Make sure to start minikube passing 'virtualbox' as the driver to use. + + minikube start --vm-driver=virtualbox + +## Setup current shell to access Docker + +Run the command below and copy/paste the exports into your terminal. + + minikube docker-env + +## Configure all shell instances to access Docker + +Run this command in your shell: + + echo 'eval $(minikube docker-env)' >> ~/.zshrc + +Now when a new shell is launched Docker will be setup automatically. diff --git a/README.md b/README.md index 70e9670..10d1e7f 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,19 @@ Make sure to have all of these items ready before using this project: * access to a Lacework tenant with admin privileges * Docker and docker-compose setup on a computer +## Docker setup for OSX + +Currently the best option for running Docker on OSX is to use Minikube. Read [Docker setup on OSX](DockerSetupOSX.md) to find out how! + ## Tools available in the docker container - terraform: 1.0.6 - heroku cli: 7.59.0 - kubectl: 1.22.1 - helm: 3.0.2 - aws cli: 1.20.48 - azure cli: 2.0.81 - gcp cli: 358.0.0 + terraform: 1.0.6 + heroku cli: 7.59.0 + kubectl: 1.22.1 + helm: 3.0.2 + aws cli: 1.20.48 + azure cli: 2.0.81 + gcp cli: 358.0.0 ## Provision a K8 Cluster From 1c6aef9ca8cfa83fd73220e071c7c184bc6ae8f1 Mon Sep 17 00:00:00 2001 From: Gabe O'Brien Date: Fri, 22 Oct 2021 16:07:13 -0700 Subject: [PATCH 2/3] task: updated readme to note docker-compose version 1.25 or higher needed --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 10d1e7f..4e42aab 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ Make sure to have all of these items ready before using this project: * GCP * Azure * access to a Lacework tenant with admin privileges -* Docker and docker-compose setup on a computer +* Docker setup on a computer +* docker-compose (v1.25 or higher) setup on a computer ## Docker setup for OSX From cac0c0946a82f959a91dc4d7c65dde924b5974ef Mon Sep 17 00:00:00 2001 From: Gabe O'Brien Date: Fri, 5 Nov 2021 10:04:11 -0700 Subject: [PATCH 3/3] Update DockerSetupOSX readme with more details on getting the right tools and packages setup --- DockerSetupOSX.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/DockerSetupOSX.md b/DockerSetupOSX.md index 5da1848..7dda5f8 100644 --- a/DockerSetupOSX.md +++ b/DockerSetupOSX.md @@ -8,11 +8,22 @@ Minikube allows for easily running a Kubernetes cluster locally and will work fo Currently there is an issue running with the default (hyperkit) driver. To get around this issue virtualbox will be the drive or choice. +## Install docker and docker-compose cli commands + +To interact with minikube the docker cli tools will need to be installed + + brew install docker docker-compose kubectl + +## Install minikube + + brew install minikube + ## Install virtual box -Installing virutalbox will require granting permission and restarting. +Installing virutalbox using the package provided by Virtualbox is probably the easiest. Download the OSX version and follow the install process. + +https://www.virtualbox.org/wiki/Downloads - brew install virtualbox ## Start docker with virtual box @@ -26,6 +37,16 @@ Run the command below and copy/paste the exports into your terminal. minikube docker-env +## Trouble shooting + +If you see this message: + + ❌ Exiting due to IF_VBOX_NOT_VISIBLE: Failed to start host: driver start: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue + +You need to grand permission for VirtualBox to start: + + System Preferences -> Security & Privacy -> Allow -> Then allow the software corporation + ## Configure all shell instances to access Docker Run this command in your shell: