Vivek
Vivek

Reputation: 1

Docker run command not working in Ubuntu 20.04 after latest docker update

I followed the below command to setup docker in Ubuntu 20.04.3

$ sudo apt-get update
$ sudo apt-get install docker.io

then tried to run hello-world image
$ sudo docker run hello-world

Got following error

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete Digest: sha------
Status: Downloaded newer image for hello-world:latest
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:348: starting container process caused "error adding seccomp filter rule for syscall clone3: permission denied": unknown.
ERRO[0008] error waiting for container: context canceled

$ docker -v
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2

Need help to get rid of this issue. Previously I was on ubuntu 18.04 with a lower version of the version of docker and took an update given by the community and lead to this error. Then updated OS (20.04.3) thinking that it might solve this issue but with no success.

Upvotes: 0

Views: 2059

Answers (1)

Robert-Jan Kuyper
Robert-Jan Kuyper

Reputation: 3306

Dont use docker.io but use the official documentation way to install docker on ubuntu. On Ubuntu I usually run the following to install docker:

apt-get update && \
apt-get install -y curl apt-transport-https ca-certificates software-properties-common && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" && \
apt-cache policy docker-ce && \
apt-get update && apt-get install -y docker-ce

Upvotes: 2

Related Questions