Giter VIP home page Giter VIP logo

docker-qt's Introduction

QT docker development environment

Overview

This docker image is intended to provide a development environment for Qt. It contains qtcreator as well as the Qt libraries and tools (such as qmake etc.)

The Qt libraries and qtcreator are built from source with the script build_qt.sh. The source is obtained from the official Qt git repositories.

Installation

See the official docker documentation for a general overview of docker and how to install:

https://docs.docker.com/engine/installation/linux/

Build and launch docker image

Build the docker image

git clone https://github.com/erstrom/docker-qt.git
cd docker-qt
./docker-build.sh

During the build process, build_qt.sh will clone the Qt git repos and build the versions specified by QT_VERSION and QT_CREATOR_VERSION. If you want other versions than the default, just update Dockerfile with the desired versions (must be valid git tags in the repo's).

Create a container

Use docker run to create a container. Two wrapper scripts are included that can be used to ease the creation of containers:

  • docker_run_shell.sh
  • docker_run_qtcreator.sh

docker_run_shell.sh creates a container and sets docker COMMAND to the default bash shell. This is useful if the container is going to be customized.

docker_run_qtcreator.sh sets docker COMMAND to qtcreator. This will launch qtcreator as soon as the container is started.

The wrapper scripts invokes docker run with a few options that makes it possible for GUI applications inside the container (like qtcreator) to connect to the xorg server on the host.

Start an existing container

docker run should only be run once, so if you want to restart an already created container you should use docker start.

The below two wrapper scripts exist for docker start:

  • docker_start_shell.sh
  • docker_start_qtcreator.sh

The scripts will (re)start the containers created by the docker_run_... scripts, i.e., docker_start_qtcreator.sh will start the container created by docker_run_qtcreator.sh.

docker-qt's People

Contributors

erstrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-qt's Issues

docker_run_qtcreator.sh error,you can give me some advice,thanks!

root@B250M-D3H:~/docker-qt# ./docker-run-qtcreator.sh
access control disabled, clients can connect from any host
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Could not initialize GLX

Error installing on Ubuntu 16.04

I have a problem installing on Ubuntu 16.04, show this error:

can you help me?

gonzas@javier-Acer-X4630G:~/Descargas/docker-qt$ sudo ./docker-build.sh
Sending build context to Docker daemon 102.9 kB
Step 1/17 : FROM ubuntu:16.04
---> f975c5035748
Step 2/17 : ENV QT_VERSION v5.9.1
---> Using cache
---> c6b6734c42b2
Step 3/17 : ENV QT_CREATOR_VERSION v4.3.1
---> Using cache
---> a51993e5a2c7
Step 4/17 : RUN apt-get -y upgrade
---> Using cache
---> 32bc19f65173
Step 5/17 : RUN apt-get -y update
---> Using cache
---> 9da29e04faa1
Step 6/17 : RUN apt-get -y build-dep qt5-default
---> Running in a1d245c71414
Reading package lists...
E: Unable to find a source package for qt5-default
Picking 'qtbase-opensource-src' as source package instead of 'qt5-default'
The command '/bin/sh -c apt-get -y build-dep qt5-default' returned a non-zero code: 100

Can you add a LICENSE?

I'd like to use a version of build_qt.sh in my build system, but there's no copyright or licensing notice. If you'd like to release it under an open source license, may I humbly suggest Apache 2, MIT, or BSD (my employer's preferences)?

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.