alpine-on-ucore.md
· 791 B · Markdown
原始文件
# Alpine on Fedora CoreOS (uCore)
The primary reason this exists at all is because I'm running Fedora CoreOS (specifically [ublue-os/ucore](https://github.com/ublue-os/ucore)) on my server as a lightweight container host. UCore comes with a few packages pre-installed, but they're primarily for getting containers up and running. This means no Vim, no htop, no lazydocker, etc. The intended path forward is that you'll use a [Distrobox](https://distrobox.it) and do all of your stuff in there. I actually quite like this approach!
```bash
#!/bin/bash
if [ -z "${CONTAINER_ID}" ] && [ -t 0 ]; then
exec distrobox enter alpine
fi
command_not_found_handle() {
# don't run if not in a container
if [ -z "${CONTAINER_ID}" ]; then
exit 127
fi
distrobox-host-exec "${@}"
}
```
Alpine on Fedora CoreOS (uCore)
The primary reason this exists at all is because I'm running Fedora CoreOS (specifically ublue-os/ucore) on my server as a lightweight container host. UCore comes with a few packages pre-installed, but they're primarily for getting containers up and running. This means no Vim, no htop, no lazydocker, etc. The intended path forward is that you'll use a Distrobox and do all of your stuff in there. I actually quite like this approach!
#!/bin/bash
if [ -z "${CONTAINER_ID}" ] && [ -t 0 ]; then
exec distrobox enter alpine
fi
command_not_found_handle() {
# don't run if not in a container
if [ -z "${CONTAINER_ID}" ]; then
exit 127
fi
distrobox-host-exec "${@}"
}