# Custom uCore build fails on semanage step (\`libsemanage.semanage\_make\_sandbox: Could not copy files to sandbox\`)

**URL:** <https://universal-blue.discourse.group/t/custom-ucore-build-fails-on-semanage-step-libsemanage-semanage-make-sandbox-could-not-copy-files-to-sandbox/12363>\
**Category:** uCore\
**Created:** [August 16, 2026, 7:50am UTC](https://universal-blue.discourse.group/t/custom-ucore-build-fails-on-semanage-step-libsemanage-semanage-make-sandbox-could-not-copy-files-to-sandbox/12363 "2026-08-16T07:50:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauldoo](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/pauldoo/32/892_2.png) [@pauldoo](https://universal-blue.discourse.group/u/pauldoo)\
**Post date:** [August 16, 2026, 7:50am UTC](https://universal-blue.discourse.group/t/custom-ucore-build-fails-on-semanage-step-libsemanage-semanage-make-sandbox-could-not-copy-files-to-sandbox/12363/1 "2026-08-16T07:50:17Z")

</div>

Hello,  
I have a custom image derived from uCore (`ghcr.io/ublue-os/ucore-hci:lts`). My Containerfile hasn’t changed, but today my build started to fail on a step where I configure SELinux:

```auto
STEP 7/8: RUN semanage port -a -t ssh_port_t -p tcp 122
libsemanage.semanage_make_sandbox: Could not copy files to sandbox /etc/selinux/targeted/tmp. (File exists).
FileExistsError: File exists
Error: building at STEP "RUN semanage port -a -t ssh_port_t -p tcp 122": while running runtime: exit status 1

```

When I get time I will try to figure out what has changed to cause this to fail now, but sharing here incase someone already knows. 🙂

---

<div class="post-metadata">

**Author:** ![pauldoo](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/pauldoo/32/892_2.png) [@pauldoo](https://universal-blue.discourse.group/u/pauldoo)\
**Post date:** [August 30, 2026, 1:55pm UTC](https://universal-blue.discourse.group/t/custom-ucore-build-fails-on-semanage-step-libsemanage-semanage-make-sandbox-could-not-copy-files-to-sandbox/12363/2 "2026-08-30T13:55:34Z")

</div>

I didn’t get around to digging into this to try and fix it, and in the meantime it has fixed itself. 🤷

I’m guessing there was a transient issue with the upstream image .. ?
