Giter VIP home page Giter VIP logo

Comments (8)

brikis98 avatar brikis98 commented on June 18, 2024

Hm, I fixed a bug yesterday where setup.sh was exiting right after the rsync install. I'm unable to repro now, both with a fresh Boot2Docker image and with an image that already has rsync installed. Is it possible you ran the code just before my fix?

from docker-osx-dev.

pschneider avatar pschneider commented on June 18, 2024

I had the same problem. Fixed it by deleting /usr/local/bin/docker-osx-dev because the new version didn't get installed by running the setup again and there was still stuff about the Vagrantfile included.

Running the setup again installed the new version of the script. Only problem was that fswatch was installed but not linked because of the following problem:

Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man7/fswatch.7
/usr/local/share/man/man7 is not writable.

Running the following script https://gist.github.com/rpavlik/768518 and then linking fswatch again worked.

Also a strange thing I noticed:

~/Sites
ยป curl https://raw.githubusercontent.com/brikis98/docker-osx-dev/master/setup.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13703  100 13703    0     0  61403      0 --:--:-- --:--:-- --:--:-- 61448
[INFO] Updating HomeBrew
Already up-to-date.
[WARN] Cask is already installed by HomeBrew, skipping
[WARN] Found command VBoxManage, assuming VirtualBox is already installed and skipping
[WARN] Boot2Docker is already installed by HomeBrew, skipping
[WARN] Docker Compose is already installed by HomeBrew, skipping
[WARN] fswatch is already installed by HomeBrew, skipping
[WARN] GNU core utilities is already installed by HomeBrew, skipping
[INFO] Installing rsync in the Boot2Docker image
------------------------------------------------------------
~/Sites
ยป curl https://raw.githubusercontent.com/brikis98/docker-osx-dev/master/setup.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13703  100 13703    0     0  36085      0 --:--:-- --:--:-- --:--:-- 36155
[INFO] Updating HomeBrew
Already up-to-date.
[WARN] Cask is already installed by HomeBrew, skipping
[WARN] Found command VBoxManage, assuming VirtualBox is already installed and skipping
[WARN] Boot2Docker is already installed by HomeBrew, skipping
[WARN] Docker Compose is already installed by HomeBrew, skipping
[WARN] fswatch is already installed by HomeBrew, skipping
[WARN] GNU core utilities is already installed by HomeBrew, skipping
[INFO] Installing rsync in the Boot2Docker image
[INFO] Adding /usr/local/bin/docker-osx-dev
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15257  100 15257    0     0  53445      0 --:--:-- --:--:-- --:--:-- 53533
[WARN] /etc/hosts already contains dockerhost, will not overwrite
[INFO] Adding DOCKER_HOST to /Users/patrick/.zshrc
[INFO] Adding DOCKER_CERT_PATH to /Users/patrick/.zshrc
[INFO] Adding DOCKER_TLS_VERIFY to /Users/patrick/.zshrc
[INSTRUCTIONS] New environment variables defined. To pick them up in the current shell, run:
    source /Users/patrick/.zshrc
[INFO] docker-osx-dev setup has completed successfully.
[INSTRUCTIONS] You can now start file syncing using the docker-osx-dev script and run Docker containers using docker run. Example:
     > docker-osx-dev
     > docker run -v $(pwd):/src some-docker-container

Why did it run further after executing the setup a second time? Maybe that is your problem, too @ilkka

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 18, 2024

@pschneider: The setup.sh script also stopped for you after the "Installing rsync" part?

Also, I'm not clear on what caused the permissions issue with fswatch. Is it some issue in HomeBrew?

from docker-osx-dev.

pschneider avatar pschneider commented on June 18, 2024

Yes, but it seems really random.

My boot2docker vm was turned off and I ran the script again and it stopped on the following output:

[INFO] Installing rsync in the Boot2Docker image
Downloading: popt.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
popt.tcz: OK
popt.tcz             100% |*******************************| 28672   0:00:00 ETA
Downloading: rsync.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
rsync.tcz             46% |**************                 | 85231   0:00:01 ETArsync.tcz: OK
rsync.tcz            100% |*******************************|   180k  0:00:00 ETA

Then running the setup.sh again everything worked:

[INFO] Installing rsync in the Boot2Docker image
[INFO] Adding /usr/local/bin/docker-osx-dev
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15257  100 15257    0     0  52784      0 --:--:-- --:--:-- --:--:-- 52792
[WARN] /etc/hosts already contains dockerhost, will not overwrite
[WARN] Your shell (/bin/zsh) already defines DOCKER_HOST (e.g. perhaps in /Users/patrick/.zshrc), will not overwrite
[WARN] Your shell (/bin/zsh) already defines DOCKER_CERT_PATH (e.g. perhaps in /Users/patrick/.zshrc), will not overwrite
[WARN] Your shell (/bin/zsh) already defines DOCKER_TLS_VERIFY (e.g. perhaps in /Users/patrick/.zshrc), will not overwrite
[INFO] docker-osx-dev setup has completed successfully.
[INSTRUCTIONS] You can now start file syncing using the docker-osx-dev script and run Docker containers using docker run. Example:
     > docker-osx-dev
     > docker run -v $(pwd):/src some-docker-container

Maybe the script was blocked because the vm wasn't fully loaded and the boot2docker ip command failed?

Now running the setup.sh again it crashes randomly on

....
[INFO] Installing rsync in the Boot2Docker image

And sometimes it works as intended

....
[INFO] Installing rsync in the Boot2Docker image
[INFO] Adding /usr/local/bin/docker-osx-dev
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15257  100 15257    0     0  81888      0 --:--:-- --:--:-- --:--:-- 82026
[WARN] /etc/hosts already contains dockerhost, will not overwrite
....

Running the install_rsync_on_boot2docker check manually always works.
Also it works every time when I run the setup.sh script locally. So it's quite hard to figure out why it fails sometimes when downloading via curl from Github.

Regarding the Homebrew issue I think this could've been related to my system because I upgraded this every time since 10.5 so maybe something broke on the way. I do not install new formulas very often.

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 18, 2024

Ah, I didn't realize it only failed when run via curl. I'm able to repro it now as well: the script intermittently stops or hangs at the "Installing rsync" part. Very weird. I'm not sure what could cause this. The code is pretty simple:

boot2docker ssh "if ! type rsync > /dev/null 2>&1; then tce-load -wi rsync; fi"

Is there some crazy interaction between reading the setup.sh script from stdin and using boot2docker ssh??

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 18, 2024

I just made the commit above to change the instructions in the README to say:

bash <(curl -s https://raw.githubusercontent.com/brikis98/docker-osx-dev/master/setup.sh)

That seems to be the recommended approach in this StackOverflow thread and in my local testing, it seems to work correctly every time. Could you try it out and see if it works better for you?

from docker-osx-dev.

pschneider avatar pschneider commented on June 18, 2024

Seems fine now ๐Ÿ‘

from docker-osx-dev.

brikis98 avatar brikis98 commented on June 18, 2024

Awesome, thanks. Closing the issue now.

from docker-osx-dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.