Coder Social home page Coder Social logo

Comments (5)

lookfwd avatar lookfwd commented on August 21, 2024

@peterceyu I can see that you're using both windows and Linux, is this right? These are current installation instructions for Docker - but I'm not sure that you should bother with them if your computer is running windows. https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#set-up-the-repository

from scrapybook.

peterceyu avatar peterceyu commented on August 21, 2024

Thanks, Dimitrios. Am trying out both Windows and Ubuntu as I am having problem with both. Former due to Asian character issues, and the later for reasons I don't understand. I tried the installing following https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#set-up-the-repository, but when I hit "vagrant up --no-parallel' in the terminal, following message comes. Sorry for the trouble, but I really wish to learn what you have written.

image

from scrapybook.

lookfwd avatar lookfwd commented on August 21, 2024

Hello Peter, could you send me a TeamViewer invite in **** to set it up for you. It should be quick

from scrapybook.

lookfwd avatar lookfwd commented on August 21, 2024

Hello Peter,

Made it work in Ubuntu with Docker. There was one necessary change in the Vagrantfile:

--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,7 +1,7 @@
 ENV['VAGRANT_DEFAULT_PROVIDER'] = "docker"
 
 host_vagrantfile = "./Vagrantfile.dockerhost"
-force_host_vm = TRUE
+force_host_vm = FALSE

Then I did sudo vagrant up --no-parallel:

$ sudo vagrant up --no-parallel
Bringing machine 'web' up with 'docker' provider...
Bringing machine 'spark' up with 'docker' provider...
Bringing machine 'es' up with 'docker' provider...
Bringing machine 'redis' up with 'docker' provider...
Bringing machine 'mysql' up with 'docker' provider...
Bringing machine 'scrapyd1' up with 'docker' provider...
Bringing machine 'scrapyd2' up with 'docker' provider...
Bringing machine 'scrapyd3' up with 'docker' provider...
Bringing machine 'dev' up with 'docker' provider...
==> web: Creating the container...
    web:   Name: web
    web:  Image: scrapybook/web
    web:   Port: 9312:9312

    web:  
    web: Container created: 8a5ccd4fdaa666c3
==> web: Starting container...
==> web: Provisioners will not be run since container doesn't support SSH.
==> spark: Creating the container...
    spark:   Name: spark
    spark:  Image: scrapybook/spark
    spark: Volume: /home/.../scrapybook:/root/book
    spark:   Port: 21:21
    spark:   Port: 30000:30000
    spark:   Port: 30001:30001
    spark:   Port: 30002:30002
    spark:   Port: 30003:30003
...
   dev: Container created: ba446506dfb060ae
==> dev: Starting container...
==> dev: Provisioners will not be run since container doesn't support SSH.

It all started successfully.

$ sudo vagrant status
Current machine states:

web                       running (docker)
spark                     running (docker)
es                        running (docker)
redis                     running (docker)
mysql                     running (docker)
scrapyd1                  running (docker)
scrapyd2                  running (docker)
scrapyd3                  running (docker)
dev                       running (docker)

Now I can connect to dev with sudo vagrant ssh dev:

$ sudo vagrant ssh dev
root@dev:~# cd book/
root@dev:~/book# ls
ch03  ch05  ch07  ch09  ch11                insecure_key  README.md    Vagrantfile.32          Vagrantfile.dockerhost.src
ch04  ch06  ch08  ch10  docker-compose.yml  lint          Vagrantfile  Vagrantfile.dockerhost

Then I can shut it down with sudo vagrant halt:

$ sudo vagrant halt
==> dev: Stopping container...
==> scrapyd3: Stopping container...
==> scrapyd2: Stopping container...
==> scrapyd1: Stopping container...
==> mysql: Stopping container...
==> redis: Stopping container...
==> es: Stopping container...
==> spark: Stopping container...
==> web: Stopping container...

Now everything should be stopped:

$ sudo vagrant status
Current machine states:

web                       stopped (docker)
spark                     stopped (docker)
es                        stopped (docker)
redis                     stopped (docker)
mysql                     stopped (docker)
scrapyd1                  stopped (docker)
scrapyd2                  stopped (docker)
scrapyd3                  stopped (docker)
dev                       stopped (docker)

After doing it once, now, it should always work and be fast to start/stop.

from scrapybook.

peterceyu avatar peterceyu commented on August 21, 2024

It works beautifully! Thanks a ton. One line change "force_host_vm = FALSE" made all the difference.

from scrapybook.

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.