Giter VIP home page Giter VIP logo

qt-docker's Introduction

Qt-Docker

Dockerfile configuration for Qt build environment on Linux and Windows specific for ModbusScope.

Environment

Some paths are already configured for this specific toolchain.

  • Folder for Qt binaries is added to path

    ENV PATH /opt/qt/${QT}/${QT_ARCH}/bin:$PATH

  • Some Qt specific paths

    ENV QT_PLUGIN_PATH /opt/qt/${QT}/${QT_ARCH}/plugins/
    ENV QML_IMPORT_PATH /opt/qt/${QT}/${QT_ARCH}/qml/
    ENV QML2_IMPORT_PATH /opt/qt/${QT}/${QT_ARCH}/qml/
    
  • Configure CMake to find correct Qt installation

    ENV CMAKE_PREFIX_PATH /opt/qt/${QT}/${QT_ARCH}/lib/cmake/Qt5

Docker

Install and setup

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

  • Add ppa and install

    • Check website
  • Test:

    • sudo docker run hello-world
      

Basic info

Older: https://www.guru99.com/docker-tutorial.html

New command style: https://medium.com/swlh/setting-up-an-ubuntu-20-04-docker-container-c74a873d26c8

  • Start docker container of latest ubuntu

    • sudo docker run --name ubuntu-build -it --entrypoint "/bin/bash" ubuntu:20.04
      
  • Show saved docker containers

    • sudo docker ps -a
  • Remove container

    • sudo docker rm [container name]

Checkout source of project

cd /home/
git clone --depth=50 --branch=master https://github.com/jgeudens/ModbusScope.git ModbusScope
cd ModbusScope

Docker hub

https://docs.docker.com/docker-hub/

Build
sudo docker build -t jgeudens/qt-linux .

Test
sudo docker run --name qt-linux -it --entrypoint "/bin/bash" jgeudens/qt-linux

Tag
sudo docker image tag jgeudens/qt-linux jgeudens/qt-linux:6.2.2_build_2

Push
sudo docker push jgeudens/qt-linux

Or with version tag
sudo docker push jgeudens/qt-linux:6.2.2_build_2

Track down missing dependencies:

Error shows libqxcb.so

ldd /opt/qt/5.15.2/gcc_64/plugins/platforms/libqxcb.so  | grep "not found"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.