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

install.sh issues on machine without docker installed #160

Open
philippem opened this issue Aug 22, 2022 · 2 comments
Open

install.sh issues on machine without docker installed #160

philippem opened this issue Aug 22, 2022 · 2 comments

Comments

@philippem
Copy link

3 issues that came up when running

curl https://getnigiri.vulpem.com | bash

on an Ubuntu 22.04.1 VM that does not yet have docker installed.

  1. the script doesn't exit when docker is not found:
$ curl https://getnigiri.vulpem.com | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3215  100  3215    0     0   9345      0 --:--:-- --:--:-- --:--:--  9345
Fetching https://github.com/vulpemventures/nigiri/releases/latest...
Latest release tag = v0.4.1
Fetching https://github.com/vulpemventures/nigiri/releases/download/v0.4.1/nigiri-linux-amd64...
Moving binary to /usr/local/bin...
Setting binary permissions...
Checking for Docker and Docker compose...
Warning: Nigiri uses Docker and it seems not to be installed, check the official documentation for downloading it.
bash: line 119: [ linux: command not found
https://docs.docker.com/v17.12/install/linux/docker-ce/ubuntu/

🍣 Nigiri Bitcoin installed!
$ 

The script should probably exit immediately.

  1. The test at line 119 reports an error (see above) that may be due to the previous test using == instead of =

  2. /usr/local/bin/nigiri is created even though docker is not installed, leading to a "half install":

$ curl https://getnigiri.vulpem.com | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3215  100  3215    0     0   9352      0 --:--:-- --:--:-- --:--:--  9345
Nigiri is already installed and will be deleted.

Info: when uninstalling an old Nigiri version Docker must be running.

Be sure to start the Docker daemon before launching this installation script.

Stopping Nigiri...
Removing Nigiri...
Removing local images...
main: line 28: docker: command not found
main: line 28: docker: command not found
main: line 28: docker: command not found

...

The script should probably check for pre-reqs (docker installed) before making any changes to the local FS.

@tiero
Copy link
Member

tiero commented Aug 23, 2022

Thank you for reporting this @philippem

We mostly test on MacOS, could be that there is some mismatches between bash/zsh etc..

The installer script is open source https://github.com/vulpemventures/nigiri-installer-script/blob/master/index.sh would you mind trying out the suggested changes in a way you can test directly?

@NonsoAmadi10
Copy link

Hello @tiero Please I would love to take this issue. I am looking for my first open source contribution and I feel this would be a great way to start

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

No branches or pull requests

3 participants