TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Compiling Qt with Docker multi-stage and multi-platform

60 pointsby mvipover 4 years ago

4 comments

mfontaniover 4 years ago
Plenty room for more (concurrent) layers, too!<p>I&#x27;ve only recently embraced using multi-stage build to concurrently split a build in two to four steps<p>* (one or more) fetcher, for fetching (say) the source package or cloning a git repo in the proper commit&#x2F;branch, or having external dependencies whose output could be cached regardless of the rest of the dockerfile contents<p>* builder, which uses &quot;COPY --from=fetcher&quot; to &quot;bring over&quot; the code or dependencies<p>* the actual resulting image, which oftentimes could well be a &quot;FROM scratch&quot; and be just comprised of &quot;COPY --from=builder&quot; instructions.<p>With &quot;docker buildx&quot;, or with &quot;DOCKER_BUILDKIT=1 docker build&quot;, it&#x27;s pure joy to use!
评论 #25520991 未加载
评论 #25520052 未加载
gyre007over 4 years ago
We are finally getting closer to multi-arch builds with Docker buildx. It&#x27;s annoying to jump the hoops when needing to do this for different things. buildx is changing that. Looking forward to having this capability in stable.
mdanielover 4 years ago
<p><pre><code> &lt;!-- wp:paragraph --&gt; &lt;p&gt;RUN mkdir -p &#x2F;sysroot&#x2F;usr &#x2F;sysroot&#x2F;opt &#x2F;sysroot&#x2F;lib&lt;&#x2F;p&gt; </code></pre> it seems that article&#x27;s formatting is having some issues
c-smileover 4 years ago
&gt; Because compiling Qt (and QtWebEngine) is a very heavy operation, we would need to pre-compile and distribute Qt so that the Dockerfile could simply download and include it in the build process (rather than compiling as part of the installation process).<p>Just in case: Release build of my Sciter.JS ( <a href="https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;sciter-js-sdk" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;c-smile&#x2F;sciter-js-sdk</a> ) gets re-compiled in <i>55 seconds</i> on pretty average dev machine that I have here. Sciter.JS is version of Sciter (<a href="https:&#x2F;&#x2F;sciter.com" rel="nofollow">https:&#x2F;&#x2F;sciter.com</a>) that uses JavaScript (ES6) script VM instead of custom TIScript.<p>Sciter.JS covers functionality of Qt UI, Qt Quick and QtWebEngine.<p>It already runs MithrilJS (micro-React), SvelteJS compilations, Leaflet (Maps) as they are. See: <a href="https:&#x2F;&#x2F;sciter.com&#x2F;sciter-js-runs-leafletjs-as-it-is&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sciter.com&#x2F;sciter-js-runs-leafletjs-as-it-is&#x2F;</a><p>The end goal is to provide UI runtime that is in times smaller than Qt+QtWebEngine and ElectronJS but is still capable to run tons of existing Web components and frameworks.
评论 #25521585 未加载
评论 #25522622 未加载
评论 #25521582 未加载