Fab*_*mez 8 containers jenkins docker kubernetes podman
我想将podman作为运行CI / CD管道的容器运行。但是,我不断从podman容器中收到此错误:
$ podman info
ERRO[0000] 'overlay' is not supported over overlayfs
Error: could not get runtime: 'overlay' is not supported over overlayfs: backing file system is unsupported for this graph driver
Run Code Online (Sandbox Code Playgroud)
我正在使用Jenkins Kubernetes插件编写在Kubernetes集群中作为容器运行的CI / CD管道。我已经成功编写了使用Docker-in-Docker容器运行docker build
和docker push
命令的管道。
但是,在容器内运行Docker客户端和Docker Daemon会使CI / CD环境变得非常膨胀,难以配置,并且使用起来并不理想。因此,我认为我可以使用podman从Dockerfiles构建Docker映像,而无需使用胖Docker守护程序。
问题是podman太新了,以至于我之前从未见过有人尝试过这样做,也没有足够的podman专家来正确执行此操作。
因此,使用针对Ubuntu的podman安装说明,我创建了以下Dockerfile:
FROM ubuntu:16.04
RUN apt-get update -qq \
&& apt-get install -qq -y software-properties-common uidmap \
&& add-apt-repository -y ppa:projectatomic/ppa \
&& apt-get update -qq \
&& apt-get -qq -y install podman
# To keep it running
CMD tail -f /dev/null
Run Code Online (Sandbox Code Playgroud)
因此,我构建了图像并按如下所示运行它:
FROM ubuntu:16.04
RUN apt-get update -qq \
&& apt-get install -qq -y software-properties-common uidmap \
&& add-apt-repository -y ppa:projectatomic/ppa \
&& apt-get update -qq \
&& apt-get -qq -y install podman
# To keep it running
CMD tail -f /dev/null
Run Code Online (Sandbox Code Playgroud)
然后在正在运行的容器上运行此命令时,出现错误:
# Build
docker build -t podman:ubuntu-16.04 .
# Run
docker run --name podman -d podman:ubuntu-16.04
Run Code Online (Sandbox Code Playgroud)
我在装有Ubuntu 16.04的计算机上安装了podman,并运行了与podman info
获得预期结果相同的命令:
$ docker exec -ti podman bash -c "podman info"
ERRO[0000] 'overlay' is not supported over overlayfs
Error: could not get runtime: 'overlay' is not supported over overlayfs: backing file system is unsupported for this graph driver
Run Code Online (Sandbox Code Playgroud)
有谁知道我该如何解决该错误并使Podman从容器中工作?
您的Dockerfile也应该安装iptables:
FROM ubuntu:16.04
RUN apt-get update -qq \
&& apt-get install -qq -y software-properties-common uidmap \
&& add-apt-repository -y ppa:projectatomic/ppa \
&& apt-get update -qq \
&& apt-get -qq -y install podman \
&& apt-get install -y iptables
# To keep it running
CMD tail -f /dev/null
Run Code Online (Sandbox Code Playgroud)
然后使用以下命令运行命令:
docker run -ti --rm podman:test bash -c "podman --storage-driver=vfs info"
Run Code Online (Sandbox Code Playgroud)
这应该给您您期望的答复。
归档时间: |
|
查看次数: |
2043 次 |
最近记录: |