How to use Udoo x86 for Docker (or I prefer Vagrant)

Questo articolo รจ stato scritto oltre 1 years, il contenuto potrebbe essere datato.

I hate Docker, a lot, but very a lot.

I think that is complicated because is not elastic and simple like for Vagrant as example.

In vagrant is easy to run a machine and kill it using the folder where there are all the files mounted by the machine.

Pretty easy also alter the machine with all the script that use for running and alter it without study how works vagrant.

Also we have a simple file of settings to change few settings like the memory (after all is a virtual machine).

There is a way to run docker in a virtual machine but is very complicated and an overload of steps.

In few words docker is no so intuitive compared to Vagrant and require more knowledge of the tool, when I want only run a dev machine to work on the website that is running.

Also docker is very dirty on the machine create duplicates, and in a while you can find that you have multiple containers of the same “machine”.

So I banned docker from my workstation, because I discovered to have too many containers of the same website and I don’t want this mess.

Use another computer for Docker

For that reason I am using Debian on my Udoo x86 with an external drive (my previous SSD) with 2 partitions.

One partition called docker is mounted on /var/lib/docker and the other one is mounted in /var/www/ in the /etc/fstab.

Of course I have also configured on my router a fixed IP address so will not change every time.

The next step was to configure a UI to manage the containers on that machine remotely.

I discovered, and configured to run automatically on the boot of the board.

After trying to run Portainer (with multiple containers and I have no idea why) and looking on the code I discovered that is possible to run a docker container on the boot.

Later I wanted also to disable the authentication of Portainer because I am using locally, so the full command is:

docker run -d -p 9000:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --no-auth

Now my Udoo on port 9000 has a simple way to manage my containers without use the ssh to connect to it.

The next steps is to mount the /var/www/ on my workstation in that way I can edit the files like on my computer.

With this little script using sshfs I can check if the machine is running SSH and later mount in a specific filter. Also using redirection I am sending the root password to access to avoid any issue.

Now I can work on like as I am on my machine, I have only to remember to run commands for the dev projects about docker or web server by SSH. Also I have to change in case the url to use to access thee web server from another machine.


Probably there are better ways to use Docker but I don’t want to learn a new tool that is so complicated that have a lot of different release (that change many things from release to release) and that probably the next year will be replaced by another one.

Many will ask why using Vagrant, because I develop websites and a VM with different websites on the same stack is more easy for me and create less headache compared to docker.

I need docker because many open source projects use that and if I want to contribute I need a docker solution that works without any problems.

Liked it? Take a second to support Mte90 on Patreon!
Become a patron at Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *