Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]: fixes install.sh issues on machine without docker installed #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NonsoAmadi10
Copy link

What does this PR do?

  • fixes the install.sh issues outlined in this issue when trying to setup nigiri
  • Ensures docker is installed on user's machine by taking into consideration the uses OS and installing accordingly
  • This ensures that when users install nigiri, they won't need to worry about not having docker as this PR takes care of that

How should this be tested?

  • Checkout to this branch and run:
bash index.sh

@NonsoAmadi10
Copy link
Author

@tiero here is my PR to the issue i tagged you on earlier. Please I would love your feedback

@NonsoAmadi10
Copy link
Author

@tiero @altafan @thunderbiscuit Please I am still expecting feedback on this PR

index.sh Outdated

function docker_install_mac(){

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Copy link
Member

@tiero tiero Mar 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not convinced we should default to brew to install docker: I would check if brew is there first, if not we can fallback to docker desktop maybe?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @tiero ! I would modify this based on your feedback and also look to see if there are other alternatives on macos other than brew that can install docker desktop. Thanks, I would revert and update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiero I have made the update, I also made provision for machines that run on apple silicon chips. At a time convenient for you, please do let me know your thoughts and leave any feedback for me. Kind regards

@NonsoAmadi10 NonsoAmadi10 requested a review from tiero April 5, 2023 15:07
index.sh Outdated
Comment on lines 85 to 87
if [ -x "$(command -v docker)" ]; then
echo "${GREEN} docker has been installed!"
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case the docker is ALREADY installed, we should not show this text.
The issue is that could seem to the user that we installed AGAIN docker, when actually we simply skip.

I tested on my Mac which has Docker already installed and I have this.

Fetching https://github.com/vulpemventures/nigiri/releases/latest...
Latest release tag = v0.4.14
Fetching https://github.com/vulpemventures/nigiri/releases/download/v0.4.14/nigiri-darwin-arm64...
Moving binary to /usr/local/bin...
Setting binary permissions...
Checking for Docker and Docker compose...
 docker has been installed!

🍣 Nigiri Bitcoin installed!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks tiero, I have made this correction. I have also squashed my commit to a single commit for this change. I await further feedbacks and reviews.
Kind regards

…on of nigiri

install docker based on the OS of the user's machine
@NonsoAmadi10 NonsoAmadi10 force-pushed the issue-missing-docker-after-installation branch from 5ef38fb to d818b72 Compare April 6, 2023 12:06
@NonsoAmadi10 NonsoAmadi10 requested a review from tiero April 6, 2023 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants