-
Notifications
You must be signed in to change notification settings - Fork 711
cannot access containerd socket "/run/containerd/containerd.sock": no such file or directory #2008
-
I am trying to create a container inside a container using nerdctl command:
root@69adc10b8807:/home/jenkins/workspace/# nerdctl version
Client:
Version: v0.8.0
Git commit: d57846db4a90540bc41e4683cd1a9f1e9e99170a
FATA[0000] cannot access containerd socket "/run/containerd/containerd.sock": no such file or directory
root@69adc10b8807:/home/jenkins/workspace/# nerdctl run -it ubuntu
FATA[0000] cannot access containerd socket "/run/containerd/containerd.sock": no such file or directory
root@69adc10b8807:/home/jenkins/workspace/# ls /run/
lock utmp
root@69adc10b8807:/home/jenkins/workspace/# find / -name containerd.sock
root@69adc10b8807:/home/jenkins/workspace/#
The /run/containerd/containerd.sock is not present.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Replies: 4 comments 4 replies
-
sudo systemctl enable --now containerd
Beta Was this translation helpful? Give feedback.
All reactions
-
This command is run inside the container of quay.io/powercloud/inbound-agent:4.10-3.2 image and so sudo: systemctl: command not found
Beta Was this translation helpful? Give feedback.
All reactions
-
You need more configuration. I believe that this discussion will help you
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @fahedouch, I tried following the doc (https://github.com/containerd/nerdctl/blob/main/docs/rootless.md).
I created a new user and tried installing containerd using the rootless approach.
root@69adc10b8807:/home/jenkins/workspace/# su aish
$ sudo /usr/local/bin/containerd-rootless-setuptool.sh install
[sudo] password for aish:
[ERROR] Refusing to install rootless containerd as the root user
$ /usr/local/bin/containerd-rootless-setuptool.sh install
[ERROR] Needs systemd (systemctl --user)
$
$ systemctl
sh: 4: systemctl: not found
But this does not work. Is there any other approach for solving this? Or am I missing anything?
Beta Was this translation helpful? Give feedback.
All reactions
-
hi @aishwaryabk , Sorry but do not understand the relation between setting up a rootless environment and the original issue to access containerd socket from the container
Beta Was this translation helpful? Give feedback.
All reactions
-
Getting the same error after I started appending the grub file and rebooted my system for setting up bpf lsm for some use case and this happend
sudo vi /etc/default/grub
Append the following to the GRUB_CMDLINE_LINUX variable and save.
GRUB_CMDLINE_LINUX="lsm=lockdown,capability,yama,apparmor,bpf"
sudo update-grub
image
image
image
image
Beta Was this translation helpful? Give feedback.
All reactions
-
Specify the mount volume when building the container, rather than mounting it through an image of an existing mount volume
apiVersion: v1
kind: Pod
metadata:
name: build-image
spec:
containers:
- name: build-image
image: ubuntu:v1.0.0
command: ["/bin/sh", "-c", "sleep infinity"]
volumeMounts:
- name: containerd-sock
mountPath: /run/containerd/containerd.sock
nodeSelector:
kubernetes.io/hostname: cluster-worker
restartPolicy: Always
volumes:
- name: containerd-sock
hostPath:
path: /run/containerd/containerd.sock
type: Socket
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello. May I ask if your image includes nerdctl? Can you access the host's containerd through nerdctl inside the Pod?
I hope to connect to the host's containerd from the privileged container of Pod, so as to support the commit operation on the running containers. I've already read a lot of discussions.
Note
I'm wondering if this discussions point to the correct answers🙏.
Beta Was this translation helpful? Give feedback.