Skip to content

Conversation

@markcunninghamgit
Copy link

No description provided.

Copilot AI review requested due to automatic review settings November 2, 2025 00:04
Copy link
Contributor

Copilot AI left a 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.

Comment on lines +8 to +13
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
Copy link

Copilot AI Nov 2, 2025

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 \"$@\".

Suggested change
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 "$@"

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,13 @@
version: '3.8'
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
version: '3.8'

Copilot uses AI. Check for mistakes.
# Builder image for Flameshot (Arch Linux)
FROM archlinux:latest

ARG DEBIAN_FRONTEND=noninteractive
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
ARG DEBIAN_FRONTEND=noninteractive

Copilot uses AI. Check for mistakes.
# Builder image for Flameshot (Fedora)
FROM registry.fedoraproject.org/fedora:40

ARG DEBIAN_FRONTEND=noninteractive
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
ARG DEBIAN_FRONTEND=noninteractive

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,44 @@
Docker packaging for Flameshot
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
Docker packaging for Flameshot
# Docker packaging for Flameshot

Copilot uses AI. Check for mistakes.
Purpose
- Small runtime image that contains the Flameshot binary and minimal Qt runtime libraries.

Key details
Copy link

Copilot AI Nov 2, 2025

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.

Copilot uses AI. Check for mistakes.
- 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)
Copy link

Copilot AI Nov 2, 2025

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.

Copilot uses AI. Check for mistakes.
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)
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
Run examples (GUI)
## Run examples (GUI)

Copilot uses AI. Check for mistakes.
xhost -local:docker
```

Notes
Copy link

Copilot AI Nov 2, 2025

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.

Copilot uses AI. Check for mistakes.
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"
Copy link

Copilot AI Nov 2, 2025

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.

Suggested change
echo "Build finished. Artifacts in $REPO_ROOT/build"
echo "Build finished. Artifacts in $REPO_ROOT/build"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant