Clean new mac install docker issues #7

Closed
opened 2024-05-27 08:24:20 +00:00 by Tom van der Laan · 8 comments

Hi,

I tried it on my wifes laptop and it failed to install docker correctly.

bash-5.2$ octojoom
Installing Docker on macOS...
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/6f720fd475ecddfae4dd3e36eb038bd3b43d7ee7/Casks/d/docker.rb
#################################################################################################################################################################################################### 100.0%
==> Downloading https://desktop.docker.com/mac/main/arm64/149282/Docker.dmg
#################################################################################################################################################################################################### 100.0%
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Linking Binary 'docker-compose.fish-completion' to '/opt/homebrew/share/fish/vendor_completions.d/docker-compose.fish'
==> Unlinking Binary '/opt/homebrew/share/fish/vendor_completions.d/docker-compose.fish'
==> Backing App 'Docker.app' up to '/opt/homebrew/Caskroom/docker/4.30.0,149282/Docker.app'
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.30.0,149282 of Cask docker
Error: It seems there is already a Binary at '/usr/local/bin/com.docker.cli'.
The file /Applications/Docker.app does not exist.
Docker is installed. Please follow the prompts to complete the installation.
Installing Docker Compose on macOS...
Password:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file /usr/local/bin/docker-compose: No such file 
Warning: or directory
100     9  100     9    0     0     36      0 --:--:-- --:--:-- --:--:--    37
curl: (23) Failure writing output to destination
ln: /usr/local/bin/docker-compose: File exists
Docker Compose is installed.

/usr/local/bin/octojoom: regel 4361: docker: opdracht niet gevonden
/usr/local/bin/octojoom: regel 4365: docker: opdracht niet gevonden
/usr/local/bin/octojoom: regel 1634: docker-compose: opdracht niet gevonden
/usr/local/bin/octojoom: regel 1635: docker-compose: opdracht niet gevonden
/usr/local/bin/octojoom: regel 4361: docker: opdracht niet gevonden
/usr/local/bin/octojoom: regel 4365: docker: opdracht niet gevonden
/usr/local/bin/octojoom: regel 1657: docker-compose: opdracht niet gevonden
/usr/local/bin/octojoom: regel 1658: docker-compose: opdracht niet gevonden
Hi, I tried it on my wifes laptop and it failed to install docker correctly. ``` bash-5.2$ octojoom Installing Docker on macOS... ==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/6f720fd475ecddfae4dd3e36eb038bd3b43d7ee7/Casks/d/docker.rb #################################################################################################################################################################################################### 100.0% ==> Downloading https://desktop.docker.com/mac/main/arm64/149282/Docker.dmg #################################################################################################################################################################################################### 100.0% ==> Installing Cask docker ==> Moving App 'Docker.app' to '/Applications/Docker.app' ==> Linking Binary 'docker-compose.fish-completion' to '/opt/homebrew/share/fish/vendor_completions.d/docker-compose.fish' ==> Unlinking Binary '/opt/homebrew/share/fish/vendor_completions.d/docker-compose.fish' ==> Backing App 'Docker.app' up to '/opt/homebrew/Caskroom/docker/4.30.0,149282/Docker.app' ==> Removing App '/Applications/Docker.app' ==> Purging files for version 4.30.0,149282 of Cask docker Error: It seems there is already a Binary at '/usr/local/bin/com.docker.cli'. The file /Applications/Docker.app does not exist. Docker is installed. Please follow the prompts to complete the installation. Installing Docker Compose on macOS... Password: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to create the file /usr/local/bin/docker-compose: No such file Warning: or directory 100 9 100 9 0 0 36 0 --:--:-- --:--:-- --:--:-- 37 curl: (23) Failure writing output to destination ln: /usr/local/bin/docker-compose: File exists Docker Compose is installed. /usr/local/bin/octojoom: regel 4361: docker: opdracht niet gevonden /usr/local/bin/octojoom: regel 4365: docker: opdracht niet gevonden /usr/local/bin/octojoom: regel 1634: docker-compose: opdracht niet gevonden /usr/local/bin/octojoom: regel 1635: docker-compose: opdracht niet gevonden /usr/local/bin/octojoom: regel 4361: docker: opdracht niet gevonden /usr/local/bin/octojoom: regel 4365: docker: opdracht niet gevonden /usr/local/bin/octojoom: regel 1657: docker-compose: opdracht niet gevonden /usr/local/bin/octojoom: regel 1658: docker-compose: opdracht niet gevonden ```
Author
Member

Hmm this was caused by a previous try to install docker without using --cask. I removed all files to clean it up and then it worked fine. But on MACOS you need docker desktop (it's what get installed through command line) and you'll just open docker desktop app after installation to get the docker daemon running. Then you can use octojoom to install traefik, portainer and you're set.

Hmm this was caused by a previous try to install docker without using --cask. I removed all files to clean it up and then it worked fine. But on MACOS you need docker desktop (it's what get installed through command line) and you'll just open docker desktop app after installation to get the docker daemon running. Then you can use octojoom to install traefik, portainer and you're set.
Owner

So are you saying we should replace:

# Check and install Docker on macOS
function install_docker_macos() {
  echo "Installing Docker on macOS..."
  brew install --cask docker
  open /Applications/Docker.app
  echo "Docker is installed. Please follow the prompts to complete the installation."
}

With:

# Check and install Docker on macOS
function install_docker_macos() {
  echo "Installing Docker on macOS..."
  brew install docker
  open /Applications/Docker.app
  echo "Docker is installed. Please follow the prompts to complete the installation."
}

Give me the guidance that will work on MACOS (any version)

So are you saying we should replace: ``` # Check and install Docker on macOS function install_docker_macos() { echo "Installing Docker on macOS..." brew install --cask docker open /Applications/Docker.app echo "Docker is installed. Please follow the prompts to complete the installation." } ``` With: ``` # Check and install Docker on macOS function install_docker_macos() { echo "Installing Docker on macOS..." brew install docker open /Applications/Docker.app echo "Docker is installed. Please follow the prompts to complete the installation." } ``` Give me the guidance that will work on MACOS (any version)
Owner

This also goes for:

# Install Docker Compose on macOS
function install_docker_compose_macos() {
  echo "Installing Docker Compose on macOS..."
  # Download the latest Docker Compose binary.
  COMPOSE_VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
  sudo curl -SL "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  # Make the Docker Compose binary executable.
  sudo chmod +x /usr/local/bin/docker-compose
  sudo ln -s /usr/local/bin/docker-compose /usr/local/bin/docker-compose
  echo "Docker Compose is installed."
}

What will be the correct way for Docker Compose

This also goes for: ``` # Install Docker Compose on macOS function install_docker_compose_macos() { echo "Installing Docker Compose on macOS..." # Download the latest Docker Compose binary. COMPOSE_VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') sudo curl -SL "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose # Make the Docker Compose binary executable. sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/local/bin/docker-compose echo "Docker Compose is installed." } ``` What will be the correct way for Docker Compose
Author
Member

I will have to test again and clean it first but i don't think compose is a gui application so you won't have any issues. when i tried installing it before it seemed to work fine. will try to clean it up best i can and then try to test again.

I will have to test again and clean it first but i don't think compose is a gui application so you won't have any issues. when i tried installing it before it seemed to work fine. will try to clean it up best i can and then try to test again.
Owner

note this in the error:

Error: It seems there is already a Binary at '/usr/local/bin/com.docker.cli'.
The file /Applications/Docker.app does not exist.

Which means there is still an installation, and the open /Applications/Docker.app might not be the correct way.

Remember I am not on Mac, nor do I have any to test this... so your input here is very helpful, thanks!

note this in the error: ``` Error: It seems there is already a Binary at '/usr/local/bin/com.docker.cli'. The file /Applications/Docker.app does not exist. ``` Which means there is still an installation, and the `open /Applications/Docker.app` might not be the correct way. Remember I am not on Mac, nor do I have any to test this... so your input here is very helpful, thanks!
Author
Member

That was exactly the issue. cleaning up the files in use/local/bin fixed it. it was causes by running brew install docker instead of brew install --cask docker. I must've done it on this laptop in the past i guess. Cleaning it and doing it again it works just fine.
After octojoom finishes installation the macOS will ask me to open docker app.

That was exactly the issue. cleaning up the files in use/local/bin fixed it. it was causes by running brew install docker instead of brew install --cask docker. I must've done it on this laptop in the past i guess. Cleaning it and doing it again it works just fine. After octojoom finishes installation the macOS will ask me to open docker app.
Owner

Okay so this means I don't change anything here right, if so please close the issue.

Okay so this means I don't change anything here right, if so please close the issue.
Author
Member

indeed :)

indeed :)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: octoleo/octojoom#7
No description provided.