neuronalmotion / qtrpi

An easy-to-use environment to cross-compile Qt applications for Raspberry Pi from your desktop.
MIT License
104 stars 40 forks source link

make init-common.sh compatible with docker build #71

Closed rose-a closed 5 years ago

rose-a commented 7 years ago

In docker build you cannot use umount and sudo.

To allow running the init-qtrpi-minimal.sh script during the build of a docker image, I suggest the following modifications:

Setting the environment variable QTRPI_DOCKER changes the behaviour of init-common.sh. In particular, it then skips the sanity check (the docker image is built on a fresh linux image anyway). Further it creates the qtrpi directory structure without using sudo.

To see this in action please have a look at the docker image at arose/qtrpi.

Btw: great work on this project so far!

synapticvoid commented 7 years ago

Hi Alexandre!

Thanks a lot for your contribution, Docker makes perfect sense. There's a couple of things I'd like to discuss before integrating this patch:

rose-a commented 7 years ago

Hi Robin,

thanks for your feedback! I made the requested changes so far.

I don't think it makes sense to put one single Dockerfile in the project root, since the configuration has to be hardcoded into the Dockerfile to allow convenient usage.

If it is to be done "right", I'd suggest providing a dockerfile for each possible combination between hardware and software and have them autobuild on docker hub. This way people could make use of the project by simply pulling and running the respective container.

Currently I have made 2 Dockerfiles for the Raspi 3 and Qt 5.6 or 5.7 at https://github.com/rose-a/qtrpi-docker-image, which are automatically build on Docker Hub. I am still working on shrinking the images, since they are currently 4.8 GB in size.

I'll integrate them into the repository as a start if you like.

synapticvoid commented 7 years ago

Hi Alexander, I see what you mean about the Docker files, I'll take some time next week to test qtrpi with the docker configuration you prepared. If everything is right, I'll integrate your PR.

Thanks a lot for your contribution!!

GuillaumeLazar commented 5 years ago

@synapticvoid : this PR should be closed if no one is working on it.