-
Notifications
You must be signed in to change notification settings - Fork 787
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
Buildah doesn't create WORKDIR directory when building container from Dockerfile #2475
Comments
Does this work fine in Docker? |
This is working for me?
|
@rhatdan I build with
|
Fix idempotency issues in podman_container Add creating workdir, buildah issue: containers/buildah#2475
Podman build 2.1.0-dev is working for me?
Does my Containerfile work for you? cat /tmp/test/Containerfile |
I test with your Dockerfile on fedora 32 and it works fine. |
Maybe this is a Rawhide thing? |
I am using a newer fuse-overlayfs then you are. |
Your file actually works for me too. But if I remove
And if I move FROM alpine
LABEL "key"="amazing value"
LABEL nobody=cares
ARG build_arg
ENV password root
ENV username root
RUN adduser -D user && \
adduser -D user2
COPY start.sh /start
WORKDIR /work
RUN chmod a+rwx /start
EXPOSE 80
EXPOSE 8080/tcp
VOLUME ["/data", "/data2"]
USER user
# WORKDIR /work
STOPSIGNAL 9
CMD ["1d"]
ENTRYPOINT ["/start"]
|
Fix idempotency issues in podman_container Add creating workdir, buildah issue: containers/buildah#2475
Fix idempotency issues in podman_container Add creating workdir, buildah issue: containers/buildah#2475 Fix #68 Fix #69 Should help to #80 as well, but will be handled separately.
Ok so the workdir is only created if Buildah runs a container on it. |
@ashley-cui Could you take a look at this. The Workdir function in Buildah should be making sure that the directory exists in the image. |
@rhatdan It looks like buildah bud works, but podman build doesn't. Would it still be a buildah workdir function issue?
|
@mheon, were you recently tweaking WORKDIR on the Podman side of things? |
Yes. This was a change in |
Just pulled down the latest podman and it seems like this issue still exists? Should I close this an open an issue in podman instead? |
I think this is fixed. Reopen if I am mistaken. |
Description
buildah didn't create automatically WORKDIR directory in container while building from Dockerfile
It seems as a regression, because it was creating it before.
Steps to reproduce the issue:
sudo podman build -t test .
sudo podman run --rm -it --entrypoint sh test
Describe the results you received:
The error appears:
Error: chdir: No such file or directory: OCI runtime command not found error
Describe the results you expected:
If I add
mkdir /work
to Dockerfile, then all works fine:Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:Podman info:
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: