-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WORKDIR cannot create a nonexistent directory #5373
Comments
I tried to build using your Dockerfile, and saw the same break. Then I removed all code from the WORKDIR that was blowing up down. I thin ran a container on the produced image and I am seeing the parent directory of the WORKDIR is a file not a directory.
is complaining because it can not create /usr/src/mimalloc/build because /usr/src/mimalloc is not a directory? |
Looks like buildah treated file path as a web side rather then a git side and just downloaded the web page.
|
Oh, I see. It was |
Description
Most of the issue details and a description are here. I thought I faced a Github runner problem, but it was reproducible with different OSes and versions.
The brief version is that I have a perfectly fine Dockerfile that can be built into an image by Docker. But any attempt to do it via Buildah ends up with a
mkdir: not a directory
error from theWORKDIR
directive with a nonexistent path.Yet something like the following example will build, no problem:
So, I suspect the
ADD
directive that precedes theWORKDIR
plays a role here. It has a Git source, and it creates a directory that is a part of a nonexistent directory’s path. Maybe it’s just an optimal combo.I tested it on Ubuntu 22.04 and apt-installed Buildah
1.23.1
(both VM and GitHub runner), Ubuntu 23.10 and apt-installed Buildah1.28.2
, Debian 12 and compiled Buildah1.35.0-dev
. And everything as stock as possible. The result was the same.Steps to reproduce the issue
buildah
Expected results
A build finishes without
mkdir
(or any) errors.Actual results
A build ends up with code 125 and
mkdir: not a directory
error.Outputs
The outputs below are for the Ubuntu 22.04 VM and Buildah 1.23.1 pair only because all of them are (kind of) irrelevant between OSes and versions. It looks like it’s possible to recreate anywhere.
Output of
apt list buildah
Output of
buildah version
Output of
cat /etc/*release
Output of
uname -a
Output of
cat /etc/containers/storage.conf
The text was updated successfully, but these errors were encountered: