-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a Dockerfile #484
Added a Dockerfile #484
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #484 +/- ##
========================================
Coverage 51.43% 51.43%
========================================
Files 82 82
Lines 9454 9454
========================================
Hits 4863 4863
Misses 4591 4591 |
Thanks for this PR, this is a very good idea! This should make it a lot easier for some people to run the GUI and especially to distribute it to machines with older compilers etc. As I am not familiar with docker, it would be great if you could add a line to the Readme and a short explanation how to run the GUI using docker to docs/Build. Would it make sense to use the CI to push an image to docker hub whenever a release (i.e. a commit on I have finally tried it out now and unfortunately ran into the following error during the build of the GUI:
It looks like the problem described here https://stackoverflow.com/a/52084936/4069571 but appears on my OSX machine even when using docker 18.09, so I'm not sure how it could be avoided. |
0a4cc38
to
c5dda64
Compare
d06f4af
to
218b5f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dockerfile looks fine and the problems I encountered are minor and can also be easily circumvented by changing e.g. the Ubuntu version.
This PR should be merged.
First time contributor checklist
Contributor checklist
develop
branchI have cleanly laid out what this pull request should achieve in the end
Description
I created a Dockerfile that downloads all dependencies and compiles the qt5 Version (at the moment assuming it stays the default CMake option) of the code.
Building the image can be done by going into the spirit directory and running
docker build -t spirit .
It may also not be a bad idea to add the Docker image to Docker Hub for easier access.
The container can then be run using
docker run -ti --rm --device=/dev/dri:/dev/dri -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix spirit
which uses the users X11 sessions (assuming that uid and gid of the host are 1000).
I've compiled the Image using both the develop and master branch.
The current version compiles the develop branch.
The current size of the image is 712MB, which may be slimmed down by only installing the necessary qt components instead of qt5-default.