Skip to content

Building flatpaks in containers #1326

Closed

Description

@johnramsden

I'm trying to build a flatpak with flatpak-builder in a Docker container and keep ending up getting bwrap errors. I have tried running Docker with -cap-add ALL, as well as setting bwrap, flatpak, and flatpak-builder setuid. No matter what I've tried I'm getting errors.

I'm running flatpak-builder with:

flatpak-builder --disable-rofiles-fuse --disable-cache --force-clean \
                        --repo=${LOCAL_REPO} \
                        "${FLATPAK_NAME}" "${FLATPAK_DNS_PREFIX}.${FLATPAK_NAME}.json"

What I get when I do not set --cap-add ALL is:

bwrap: Creating new namespace failed: Operation not permitted

And if I do, I get a pivot_root error.

pivot_root: Operation not permitted

Is it possible to run flatpak in a container?

Activity

  1. johnramsden commented on Jan 19, 2018

    @johnramsden
    ContributorAuthor

    I've gotten it to work by running docker with --privileged.

  2. MihaiTabara commented on Aug 3, 2018

    @MihaiTabara

    Follow-up on this, has anyone found a way to overcome this problem without enabling the container access to all devices on the host?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions