Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

add vagrantfile and build script to create a VM using docker #185

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

paskino
Copy link
Contributor

@paskino paskino commented May 11, 2021

No description provided.



# add sirfuser to the group docker
sudo groupadd docker
Copy link
Contributor Author

Choose a reason for hiding this comment

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

possibly this is not needed because the group is added when installing docker

@paskino paskino requested a review from KrisThielemans May 11, 2021 13:31
Copy link
Member

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

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

I'm confused. why would we not do this in the normal Vagrantfile and have docker always installed?

@paskino
Copy link
Contributor Author

paskino commented May 11, 2021

This VM installs only docker and few more bits like GNOME. All SIRF prerequisites are then installed by docker.
I wanted to keep the 2 things separated. I suppose this will be the new VM.

@KrisThielemans
Copy link
Member

ah ok. sorry, I misunderstood. ok.

I think it would be worth adding any docker config to the normal VM (probably only the docker group and adding sirfuser to it). That way people don't trip up there.

Although you won't like it, I really don't think that this VM should become the standard one. A VM that just wraps docker seems inefficient. Linux/MacOS users don't need it. Windows users who refuse to enable HyperV could, but Docker doesn't recommend it. (It seems that the previous docker Windows workaround which effectively was running it in VirtualBox is no longer available).

In my mind, the VM and the docker instance serve 2 different purposes.

  • The VM provides a fully working environment with GUI etc. It's suitable for people who either don't know too much, or know a lot about Linux and don't have their own Linux machine
  • The Docker image is a minimal image that is most suitable for CLI stuff or jupyter. (If you have a Linux host, you can set-up X pass-through etc, but I'd call that a niche set of users).

So, I'm happy with PR as an experiment for crazy people like us. And we can merge it as long as the doc makes it clear what is what. But I don't think we should distributed this VM.

@paskino
Copy link
Contributor Author

paskino commented May 11, 2021

Actually the real reason I need this is that, because I'm forced to use VirtualBox to create the normal VM, I cannot use docker on my windows laptop.

I thought that trying to do things to the docker files without testing would be a bad idea, so I resorted to create a Virtualbox VM for the sole purpose of running docker... :D

@KrisThielemans
Copy link
Member

sure. (I just did the same on my normal VM, after attaching another disk).

# accessing "localhost:8080" will access port 80 on the guest machine.

# Forward port for jupyter notebooks
config.vm.network "forwarded_port", guest: 8888, host: 8889
Copy link
Contributor Author

Choose a reason for hiding this comment

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

guest should be 9999 as jupyter on the docker instance responds to port 8888, which is forwarded to 9999.

Host: 8889 -> VirtualBox 9999 -> docker 8888

@paskino paskino marked this pull request as draft June 23, 2021 10:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants