-
Notifications
You must be signed in to change notification settings - Fork 1.8k
docker build images #4356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker build images #4356
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive Docker packaging infrastructure for Flameshot, enabling containerized builds and runtime execution across multiple Linux distributions.
Key changes:
- Multi-distribution builder images (Ubuntu 24.04, Fedora 40, Arch, Rocky, openSUSE Tumbleweed) with automated build scripts
- Runtime container image based on Ubuntu 24.04 with minimal Qt6 dependencies
- Documentation and helper scripts for local development and CI integration
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| packaging/docker/readme.md | Main documentation for Docker packaging with quickstart examples |
| packaging/docker/example-compose.yml | Docker Compose configuration for running Flameshot GUI |
| packaging/docker/docker-run/* | Runtime image Dockerfile, helper script, and documentation |
| packaging/docker/docker-build/*/Dockerfile | Builder images for Ubuntu 24.04, Fedora 40, Arch, Rocky, and openSUSE |
| packaging/docker/docker-build/*/build.sh | Build automation scripts for each distribution |
| packaging/docker/docker-build/*.md | Documentation for builder images, targets, and NixOS notes |
| packaging/docker/docker-build/ci-args.sh | CI configuration template |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if [[ -z "${DISPLAY:-}" && -z "${WAYLAND_DISPLAY:-}" ]]; then | ||
| echo "No DISPLAY or WAYLAND_DISPLAY set; running in CLI mode" | ||
| exec /usr/local/bin/flameshot "$@" | ||
| else | ||
| exec /usr/local/bin/flameshot "$@" | ||
| fi |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both branches of the if-else statement execute identical code. The conditional check is redundant and the echo message is never useful since the script immediately execs. Consider removing the conditional entirely and just using exec /usr/local/bin/flameshot \"$@\".
| if [[ -z "${DISPLAY:-}" && -z "${WAYLAND_DISPLAY:-}" ]]; then | |
| echo "No DISPLAY or WAYLAND_DISPLAY set; running in CLI mode" | |
| exec /usr/local/bin/flameshot "$@" | |
| else | |
| exec /usr/local/bin/flameshot "$@" | |
| fi | |
| exec /usr/local/bin/flameshot "$@" |
| @@ -0,0 +1,13 @@ | |||
| version: '3.8' | |||
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version field in Docker Compose files has been deprecated since Compose V2 and is no longer required. Consider removing this line to follow current best practices.
| version: '3.8' |
| # Builder image for Flameshot (Arch Linux) | ||
| FROM archlinux:latest | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEBIAN_FRONTEND is a Debian/Ubuntu-specific environment variable that has no effect on Arch Linux which uses pacman. This ARG declaration should be removed.
| ARG DEBIAN_FRONTEND=noninteractive |
| # Builder image for Flameshot (Fedora) | ||
| FROM registry.fedoraproject.org/fedora:40 | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEBIAN_FRONTEND is a Debian/Ubuntu-specific environment variable that has no effect on Fedora which uses dnf. This ARG declaration should be removed.
| ARG DEBIAN_FRONTEND=noninteractive |
| @@ -0,0 +1,44 @@ | |||
| Docker packaging for Flameshot | |||
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The document title should be formatted as a markdown heading (e.g., # Docker packaging for Flameshot) for proper document structure and rendering.
| Docker packaging for Flameshot | |
| # Docker packaging for Flameshot |
| Purpose | ||
| - Small runtime image that contains the Flameshot binary and minimal Qt runtime libraries. | ||
|
|
||
| Key details |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Section headers should be formatted as markdown headings (e.g., ## Key details) for proper document structure and navigation.
| - Expects compiled binary to be available in the builder image at `/src/build/src/flameshot`. | ||
| - Copies binary into `/usr/local/bin/flameshot` and runs as non-root `flameshot` user. | ||
|
|
||
| Usage (local with manual copy) |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Section headers should be formatted as markdown headings (e.g., ## Usage (local with manual copy)) for proper document structure and navigation.
| Usage (local with manual copy) | ||
| - If you built locally using the builder container and produced `/path/to/repo/build/src/flameshot`, you can build the runtime with a local context that places the binary in the right place or use the builder image approach described in the builder's README. | ||
|
|
||
| Run examples (GUI) |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Section headers should be formatted as markdown headings (e.g., ## Run examples (GUI)) for proper document structure and navigation.
| Run examples (GUI) | |
| ## Run examples (GUI) |
| xhost -local:docker | ||
| ``` | ||
|
|
||
| Notes |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Section headers should be formatted as markdown headings (e.g., ## Notes) for proper document structure and navigation.
| docker run --rm -it -v "$REPO_ROOT":/src -w /src "$IMAGE_NAME" \ | ||
| bash -lc "rm -rf build && cmake -S . -B build -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release && cmake --build build -j\$(nproc)" | ||
|
|
||
| echo "Build finished. Artifacts in $REPO_ROOT/build" |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace detected at end of line.
| echo "Build finished. Artifacts in $REPO_ROOT/build" | |
| echo "Build finished. Artifacts in $REPO_ROOT/build" |
No description provided.