Skip to content
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

nerdctl: build fails to include basic commands such as COPY #7923

Closed
bwdmr opened this issue Dec 11, 2024 · 4 comments
Closed

nerdctl: build fails to include basic commands such as COPY #7923

bwdmr opened this issue Dec 11, 2024 · 4 comments
Assignees
Labels
kind/bug Something isn't working platform/macos runtime/containerd triage/needs-information Further information is requested triage/not-reproducible Not (or no longer) reproducible

Comments

@bwdmr
Copy link

bwdmr commented Dec 11, 2024

Actual Behavior

containerd api does not interpret the dockerfile correctly

Steps to Reproduce

FROM ubuntu:20.04

# Ensure necessary utilities are installed
RUN apt-get update && apt-get install -y coreutils

# Create a non-root user
RUN useradd -m -s /bin/bash dev

COPY ./entrypoint.sh /entrypoint.sh
RUN chown dev /entrypoint.sh

USER dev
WORKDIR /home/dev

# Ensure /dev/null exists
#RUN mknod -m 666 /dev/null c 1 3

# Set entrypoint with explicit path
ENTRYPOINT ["/usr/bin/tail", "-f", "/dev/null"]

disable kubernetes.
enable docker: success
disable kubernetes
enable containerd: success
enable kubernetes
enable containerd: fail

Result

i cant tell what fails. it just stops working if kubernetes runs. and works if not.

Expected Behavior

the containerd api to interpret the dockerfile correctly.

Additional Information

No response

Rancher Desktop Version

1.16.0

Rancher Desktop K8s Version

1.30.6

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

macOS

Operating System / Build Version

MacOS

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

No response

@bwdmr bwdmr added the kind/bug Something isn't working label Dec 11, 2024
@bwdmr
Copy link
Author

bwdmr commented Dec 11, 2024

if you wondering. entrypoint is just #/bin/bash echo hello
here the commands for easy reproduction:

  • nerdctl build -t test .
  • nerdctl run --rm -it --entrypoint="sh" test -c "ls /entrypoint.sh"

@jandubois
Copy link
Member

I cannot reproduce the issue:

CleanShot 2024-12-11 at 11 04 47@2x

@jandubois
Copy link
Member

@bwdmr We need additional information to do anything further. Please capture both the exact commands you run and the error messages you get from nerctl build and/or nerdctl run!

Can you also enable debug logging (on the Troubleshooting page) and after you reproduce the failure, collect and attach the logs?

And, are you running the nerdctl build command always from the same directory, and is the directory somewhere under your home directory?

@jandubois jandubois added the triage/needs-information Further information is requested label Dec 11, 2024
@bwdmr
Copy link
Author

bwdmr commented Dec 12, 2024

closed. i rebuilt and can confirm it works as described by you.
thanks for the quick reply.

@bwdmr bwdmr closed this as completed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/macos runtime/containerd triage/needs-information Further information is requested triage/not-reproducible Not (or no longer) reproducible
Projects
None yet
Development

No branches or pull requests

2 participants