mirror of
https://codeberg.org/hyperreal/containers
synced 2024-11-25 19:53:41 +01:00
18 lines
644 B
Plaintext
18 lines
644 B
Plaintext
|
FROM quay.io/buildah/stable:v1.34.0
|
||
|
|
||
|
RUN touch /etc/subgid /etc/subuid \
|
||
|
&& chmod g=u /etc/subgid /etc/subuid /etc/passwd \
|
||
|
&& echo build:10000:65536 > /etc/subuid \
|
||
|
&& echo build:10000:65536 > /etc/subgid
|
||
|
|
||
|
# Use chroot since the default runc doesn't work when running rootless
|
||
|
RUN echo "export BUILDAH_ISOLATION=chroot" >> /home/build/.bashrc
|
||
|
|
||
|
# Use VFS since fuse does not work
|
||
|
RUN mkdir -p /home/build/.config/containers \
|
||
|
&& (echo '[storage]';echo 'drive = "vfs"') > /home/build/.config/containers/storage.conf
|
||
|
|
||
|
# The buildah container will run as build user
|
||
|
USER build
|
||
|
WORKDIR /home/build
|