Skip to content

Instantly share code, notes, and snippets.

@lduboeuf
Last active July 6, 2019 12:36
Show Gist options
  • Save lduboeuf/e68aaab20f0772f6058684faf4472ba2 to your computer and use it in GitHub Desktop.
Save lduboeuf/e68aaab20f0772f6058684faf4472ba2 to your computer and use it in GitHub Desktop.
QtCreator in clickable container
FROM clickable/ubuntu-sdk:16.04-amd64
# Install lots of packages
RUN apt-get update && apt-get install -y libxext-dev libxrender-dev libxtst-dev wget
# Download script
RUN wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
RUN chmod +x ./qt-unified-linux-x64-online.run
# Run installer as entrypoint
ENTRYPOINT ./qt-unified-linux-x64-online.run
docker build -t qtcreator:base .
# N.B. This is an important step any time you're running GUIs in containers
xhost local:root
# Run installation wizard, save to new image, delete left over container
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v /dev/shm:/dev/shm --device /dev/dri --name qt_install --entrypoint /qt-unified-linux-x64-online.run qtcreator:base
docker commit qt_install qtcreator:latest
docker rm qt_install
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v /dev/shm:/dev/shm -v /home/lionel/dev/ubuntutouch:/home/dev -e QML_IMPORT_PATH=/usr/lib/x86_64-linux-gnu/qt5/qml --device /dev/dri --name qt_creator --rm --entrypoint /opt/Qt/Tools/QtCreator/bin/qtcreator qtcreator:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment