Closed Masber closed 2 years ago
@Masber this smells like a crun issue in Ubuntu. I think 20.04 has crun included, but I'm not sure if it's the default. I don't have a way to check quickly, can you?
sorry, need to clarify this. So by crun, do you mean this https://github.com/containers/crun?
What sort of host is it? If it's using cgroups v1, and the container isn't privileged, it's not going to be able to create its own control groups. Try setting BUILDAH_ISOLATION=chroot
or running it with --isolation chroot
to have buildah use something that's more like chroot for handling RUN instructions, instead of attempting to run a proper container inside the container.
A friendly reminder that this issue had no activity for 30 days.
Since we received no further feedback, I am going to close, reopen if you have more feedback.
Description we are trying to build a container image inside a container using buildah. The build process starts but then fails when we try to run
apt-get update
error:
Steps to reproduce the issue:
Install buildah in container image
Docker file FROM ubuntu:20.04
ARG SPACK_VER=0.17.0 ENV SPACK_ROOT=/opt/spack
This list corresponds mostly to the list from the spack dockerfile (share/spack/docker/ubuntu-1804.dockerfile)
RUN apt-get update \ && env DEBIAN_FRONTEND=noninteractive TZ=Europe/Zurich \ apt-get -yqq install --no-install-recommends \ build-essential \ ca-certificates \ curl \ file \ g++ \ gcc \ gfortran \ git \ gnupg2 \ iproute2 \ lmod \ locales \ lua-posix \ make \ patch \ python3 \ python3-pip \ python3-setuptools \ tcl \ unzip \ vim \ less \ && locale-gen en_US.UTF-8 \ && rm -Rf /var/lib/apt/lists/*
RUN mkdir -p $SPACK_ROOT \ && git clone -b v${SPACK_VER} https://github.com/spack/spack $SPACK_ROOT \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/local/bin/docker-shell \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/local/bin/interactive-shell \ && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash /usr/local/bin/spack-env
ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LC_ALL en_US.UTF-8
RUN mkdir -p /root/.spack \ && cp $SPACK_ROOT/share/spack/docker/modules.yaml /root/.spack/modules.yaml \ && rm -rf /root/. /run/nologin $SPACK_ROOT/.git
WORKDIR /root SHELL ["docker-shell"]
RUN spack spec hdf5+mpi ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"] CMD ["interactive-shell"]
Describe the results you received:
Describe the results you expected:
I would expect buildah bud to create the container image successfully
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: