Buildiso doesn't work in docker #323

Closed
opened 2020-05-02 22:45:16 +00:00 by DeMysteriisMundi · 11 comments
DeMysteriisMundi commented 2020-05-02 22:45:16 +00:00 (Migrated from gitlab2.manjaro.org)

Hello!

I am not experienced in CI/CD automatization, but I am trying to make auto build the iso in docker, which runs in CircleCI machine. I use machine executor in CircleCI to start docker in privileged mode, but buildiso still gives an error: 2020-05-03_May3829-1000x363

I use the next command to start the docker container:

docker run \
          --name manjarolinux-build \
          --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \
          --workdir "/home/isobuilder/project" \
          --cap-add SYS_ADMIN \
          --entrypoint "./install.sh" \
          demysteriismundi/manjarolinux-build:stable -b

I hope you will tell me the way to solve this problem. Maybe CircleCI not suitable for such purposes so what can I use for that?

Hello! I am not experienced in CI/CD automatization, but I am trying to make auto build the iso in docker, which runs in CircleCI machine. I use machine executor in CircleCI to start docker in privileged mode, but buildiso still gives an error: ![2020-05-03_May3829-1000x363](/uploads/d902ad75d92d79e45eeb29357cdf76bb/2020-05-03_May3829-1000x363.png) I use the next command to start the docker container: ``` docker run \ --name manjarolinux-build \ --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \ --workdir "/home/isobuilder/project" \ --cap-add SYS_ADMIN \ --entrypoint "./install.sh" \ demysteriismundi/manjarolinux-build:stable -b ``` I hope you will tell me the way to solve this problem. Maybe CircleCI not suitable for such purposes so what can I use for that?
DeMysteriisMundi commented 2020-05-03 13:40:35 +00:00 (Migrated from gitlab2.manjaro.org)

Okay. I tried to use TravisCI. And it almost helped.

The problem #212 is repeated. I've not found the problem solution there and I've tried some ways to solve this by himself.

I found the similar issue and changed the docker run options:

docker run \
  --name manjarolinux-build \
  --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \
  --workdir "/home/isobuilder/project" \
  --cap-add SYS_ADMIN \
  --entrypoint "./install.sh" \
  --security-opt=apparmor:unconfined \
  demysteriismundi/manjarolinux-build:stable -b

And result of this command:
2020-05-03_May4115-962x243

Also I observe errors during the build:
2020-05-03_May4313-630x315

Anybody knows the solution?

Okay. I tried to use TravisCI. And it almost helped. The problem [#212](https://gitlab.manjaro.org/tools/development-tools/manjaro-tools/-/issues/212) is repeated. I've not found the problem solution there and I've tried some ways to solve this by himself. I found the similar [issue](https://stackoverflow.com/questions/32510778/error-using-mount-command-within-dockerfile) and changed the docker run options: ``` docker run \ --name manjarolinux-build \ --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \ --workdir "/home/isobuilder/project" \ --cap-add SYS_ADMIN \ --entrypoint "./install.sh" \ --security-opt=apparmor:unconfined \ demysteriismundi/manjarolinux-build:stable -b ``` And result of this command: ![2020-05-03_May4115-962x243](/uploads/005432c0aa061eb3566704086458a9d0/2020-05-03_May4115-962x243.png) Also I observe errors during the build: ![2020-05-03_May4313-630x315](/uploads/aa1dd8c77a9dfc072409529325edb757/2020-05-03_May4313-630x315.png) Anybody knows the solution?
mikeroyal commented 2020-05-12 17:42:13 +00:00 (Migrated from gitlab2.manjaro.org)

Are you using the Manjaro Docker repo?

Are you using the [Manjaro Docker repo](https://github.com/manjaro/manjaro-docker)?
DeMysteriisMundi commented 2020-05-12 17:57:26 +00:00 (Migrated from gitlab2.manjaro.org)

@mikeroyal I created docker image based on manjarolinux/base: Dockerfile.

@mikeroyal I created docker image based on manjarolinux/base: [Dockerfile](https://github.com/DeMysteriisMundi/dockerfiles/blob/master/manjarolinux-build/Dockerfile).
JPyke3 commented 2020-09-07 00:56:06 +00:00 (Migrated from gitlab2.manjaro.org)

Any updates to this? I am trying to do something very similiar but am running into the same error.

==> Prepare [Desktop installation] (desktopfs)
 --> overlayfs mount: [/var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs]
mount: /var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error.
==> ERROR: A failure occurred in make_image_desktop().
    Aborting...
Any updates to this? I am trying to do something very similiar but am running into the same error. ``` ==> Prepare [Desktop installation] (desktopfs) --> overlayfs mount: [/var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs] mount: /var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error. ==> ERROR: A failure occurred in make_image_desktop(). Aborting... ```
JPyke3 commented 2020-09-07 01:38:12 +00:00 (Migrated from gitlab2.manjaro.org)

I noticed the container does log some dmesg output as well, not sure if this is of use for debugging:

[18522.284483] overlayfs: filesystem on '/var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs' not supported as upperdir
I noticed the container does log some `dmesg` output as well, not sure if this is of use for debugging: ``` [18522.284483] overlayfs: filesystem on '/var/lib/manjaro-tools/buildiso/gnome/x86_64/desktopfs' not supported as upperdir ```
JPyke3 commented 2020-09-07 02:02:29 +00:00 (Migrated from gitlab2.manjaro.org)

Okay, I fixed the problem.

The issue stems from the fact that Docker itself uses an overlayFS as its storage engine. It seems like you cannot mount an overlay filesystem from within an overlay filesystem which was causing the error. When I switched to VFS as the docker storage engine the error went away. Keep in mind that VFS is alot larger than overlay.

The docker documentation on VFS and how to switch to it.

Okay, I fixed the problem. The issue stems from the fact that Docker itself uses an `overlayFS` as its storage engine. It seems like you cannot mount an `overlay` filesystem from within an `overlay` filesystem which was causing the error. When I switched to VFS as the docker storage engine the error went away. Keep in mind that VFS is alot larger than `overlay`. [The docker documentation on VFS](https://docs.docker.com/storage/storagedriver/vfs-driver/) and how to switch to it.
JPyke3 commented 2020-09-08 10:27:30 +00:00 (Migrated from gitlab2.manjaro.org)

To any devs that might know how to fix this, it would be rather helpful. As (AFIK) almost all CI/CD pipelines will use overlay as a filesystem. If I come across any fixes to get this working in GitHub actions I will report back.

To any devs that might know how to fix this, it would be rather helpful. As (AFIK) almost all CI/CD pipelines will use `overlay` as a filesystem. If I come across any fixes to get this working in GitHub actions I will report back.
talesam commented 2021-06-07 03:39:56 +00:00 (Migrated from gitlab2.manjaro.org)

I had a question, where are the ISO changes made? This command is to generate the ISO automatically, I don't know where the changes will be.

I had a question, where are the ISO changes made? This command is to generate the ISO automatically, I don't know where the changes will be.
talesam commented 2021-06-07 03:47:45 +00:00 (Migrated from gitlab2.manjaro.org)
docker run \
  --name manjarolinux-build \
  --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \
  --workdir "/home/isobuilder/project" \
  --cap-add SYS_ADMIN \
  --entrypoint "./install.sh" \
  --security-opt=apparmor:unconfined \
  demysteriismundi/manjarolinux-build:stable -b

/home/isobuilder/project -> this is inside the container
demysteriismundi/manjarolinux-build-> This is the image that is on the hub

Where did you configure iso-profiles? (git clone https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ~/iso-profiles)

``` docker run \ --name manjarolinux-build \ --mount type=bind,src="$(pwd)",dst="/home/isobuilder/project" \ --workdir "/home/isobuilder/project" \ --cap-add SYS_ADMIN \ --entrypoint "./install.sh" \ --security-opt=apparmor:unconfined \ demysteriismundi/manjarolinux-build:stable -b ``` `/home/isobuilder/project` -> this is inside the container `demysteriismundi/manjarolinux-build`-> This is the image that is on the hub Where did you configure iso-profiles? (git clone https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ~/iso-profiles)
talesam commented 2021-06-07 03:53:26 +00:00 (Migrated from gitlab2.manjaro.org)

Can you give me all the configuration you created? I'm trying to automate the iso creation of a distribution based on manjaro to be created inside the docker.

Can you give me all the configuration you created? I'm trying to automate the iso creation of a distribution based on manjaro to be created inside the docker.
yochananmarqos1 commented 2025-10-05 22:45:04 +00:00 (Migrated from gitlab2.manjaro.org)

Closing stale issue

Closing stale issue
yochananmarqos1 (Migrated from gitlab2.manjaro.org) closed this issue 2025-10-05 22:45:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#323
No description provided.