Giter VIP home page Giter VIP logo

docker-linuxdeployqt's Introduction

A docker packaged solution for AppImage packaging using linuxdeployqt

Docker builds are published on Docker Hub and GitHub Registry (check the Packages section). For the most recent Qt versions built check the Actions tab.

Motivation

This container was written mostly to automate the AppImage packaging process of the Seamly2D repository. As linuxdeployqt has a strict dependency on a specific version of glibc, it felt easier to use a container instead of settings up Ubuntu 16.04 instances/GitHub runner.

When the linuxdeployqt mininum version of Ubuntu changes, the images in this repository should get updated. If they aren't, please create an issue.

Installs Qt (differs by branch name) + other custom versions used in the Seamly2D repository, and linuxqtdeploy v6

Usage

docker run -e EXTRA_BINARIES="" --cap-add SYS_ADMIN --device /dev/fuse -v `pwd`/appdir:/app/usr:Z --rm -ti linuxdeployqt

EXTRA_BINARIES is a space separatered list of binary names; located in /app/usr/bin/ and further passed on to linuxdeployqt via the executable argument

Because linuxdeployqt uses fuse we have to grant it SYS_ADMIN capabilities and allow access to /dev/fuse. See docker/for-linux#321

docker-linuxdeployqt's People

Contributors

mhitza avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

lattice0

docker-linuxdeployqt's Issues

Docker needs gcc-9

Hi @mhitza !!!

Can you install gcc-9 in Docker to correct this problem? Thanks!!!!

Background:
Both Ubuntu 18.04 and the default Docker build use gcc-8, and Ubuntu 20.04 (Ubuntu-latest) uses gcc-9.
Our weekly release is built on Ubuntu-latest (gcc-9) then your linuxdeployqt pulls it into Docker (gcc-8). The build fails with an error message about not finding gcc-9. see message below.
Our other workflows allow us to build with Ubuntu 18.04 so there isn't a problem.

Can you install gcc-9 in Docker to correct this problem? Then we can upgrade all of our workflows to Ubuntu-latest, and resume our weekly builds.

Status: Downloaded newer image for mhitza/linuxdeployqt:5.13.2
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "gcc:9.3": executable file not found in $PATH: unknown.
time="2021-03-22T00:58:53Z" level=error msg="error waiting for container: context canceled"
Error: Process completed with exit code 127.

link to this build message: https://github.com/FashionFreedom/Seamly2D/runs/2162115087?check_suite_focus=true

Cannot build this image anymore

Hello, I worked on this repo before. It cannot be built anymore

First, I had to modify ARG QT_VERSION to

ARG QT_VERSION=5.13

Then I did

RUN aqt install $QT_VERSION linux desktop -m all && cp -R ./$QT_VERSION/gcc_64/* /usr && rm -rf ./$QT_VERSION

but it tries to download from qt.io which does not exist anymore

WARNING - Specified Qt version is unknown: 5.15

Instead of downloading from docker repo, tried to do:

user@localhost:~/tt/docker-linuxdeployqt$ sudo docker build -t ll .
Sending build context to Docker daemon  106.5kB
Step 1/9 : FROM ubuntu:16.04
 ---> 005d2078bdfa
Step 2/9 : ENV QT_SELECT=5
 ---> Using cache
 ---> eeaf730d5a83
Step 3/9 : RUN apt update &&       apt install --assume-yes python3-pip wget fuse binutils libglib2.0-0 &&     python3 -m pip install --upgrade pip
 ---> Using cache
 ---> 28647564792b
Step 4/9 : RUN pip3 install "aqtinstall==0.8"
 ---> Using cache
 ---> 53f682c8ab19
Step 5/9 : RUN aqt install 5.15 linux desktop -m all && cp -R ./5.15/gcc_64/* /usr && rm -rf ./5.15
 ---> Running in 050eb211d0b7
2020-06-13 03:59:54,747 - aqt - INFO - aqtinstall(aqt) v0.8 on Python 3.5.2 [CPython GCC 5.4.0 20160609]
2020-06-13 03:59:54,747 - aqt - WARNING - Specified Qt version is unknown: 5.15.
2020-06-13 03:59:55,986 - aqt - ERROR - Download error when access to https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_515/Updates.xml
Server response code: 404, reason: Not Found
The command '/bin/sh -c aqt install 5.15 linux desktop -m all && cp -R ./5.15/gcc_64/* /usr && rm -rf ./5.15' returned a non-zero code: 1

tried specifying other version:

2020-06-13 03:58:46,789 - aqt - INFO - aqtinstall(aqt) v0.8 on Python 3.5.2 [CPython GCC 5.4.0 20160609]
2020-06-13 03:58:46,790 - aqt - WARNING - Specified Qt version is unknown: 5.12.
2020-06-13 03:58:53,118 - aqt - ERROR - Download error when access to https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt5_512/Updates.xml
Server response code: 404, reason: Not Found

Then I went into https://download.qt.io/online/qtsdkrepository/linux_x64/desktop and found that 5.150 hangs forever but 5.140 worked.

RUN aqt install 5.140 linux desktop -m all && cp -R ./5.140/gcc_64/* /usr && rm -rf ./5.140

but I have no space on the drive now to test if cp -R ./5.140/gcc_64/* /usr && rm -rf ./5.140 will work. Will update you soon.

merge opinion about seamly2d fix for appimage generation

Your repo is being used in Seamly2D to create appimages for both seamly2d and seamlyme. The seamly2d's appimage also includes seamlyme, but launching seamlyme from seamly2d wont work because linuxdeployqt only attaches the libraries from the binary pointed by seamly2d.desktop, which is seamly2d. In order to also include the dependencies from seamlyme, we have to pass -executable=/app/usr/bin/seamlyme to linuxdeployqt

So I forked this repo and created a .sh file for seamly2d and another one for seamlyme. Take a look: https://github.com/lucaszanella/docker-linuxdeployqt/tree/41a73d6f8bb6650453da431afb82c7eddcf611f8 (the builder.sh is not being used right now, gonna delete).

This is how it's bein called right now:

          mkdir -p /home/runner/local/share/applications /home/runner/local/share/icons/hicolor/256x256

          cp dist/seamly2d.desktop /home/runner/local/share/applications/
          cp share/img/Seamly2D_logo_254x254.png /home/runner/local/share/icons/hicolor/256x256/seamly2d.png

          docker run --cap-add SYS_ADMIN --device /dev/fuse \
            --security-opt apparmor:unconfined --security-opt seccomp=unconfined \
            -v /home/runner/local:/app/usr \
            --rm lucaszanella/linuxdeployqt /bin/bash make_seamly2d_appimage.sh

          mv /home/runner/local/Seamly2D*.AppImage Seamly2D.AppImage
          cp share/img/Seamly2D_logo_254x254.png /home/runner/local/share/icons/hicolor/256x256/seamlyme.png

          rm /home/runner/local/share/applications/seamly2d.desktop
          cp dist/seamlyme.desktop /home/runner/local/share/applications

          docker run --cap-add SYS_ADMIN --device /dev/fuse \
            --security-opt apparmor:unconfined --security-opt seccomp=unconfined \
            -v /home/runner/local:/app/usr \
            --rm lucaszanella/linuxdeployqt /bin/bash make_seamlyme_appimage.sh

          mv /home/runner/local/SeamlyMe*.AppImage SeamlyMe.AppImage

with this the seamly2d's appimage correctly included the dependencies for seamly2d and seamlyme and launching seamlye from seamly2d works.

However, since I'm having problems downloading the qt binaries and building my own docker image, I built mine based on yours, see the Dockerfile.

Anyways, what you think of that? How do you think a merge should be done? It looks like this repo is used for Seamly2D project but can be used for others, so this is why I ask, because my repo is specifically for Seamly2D as it included the extra executables in .sh.

I'd like to know how you prefer to merge this

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.