Solve the problem of running hello-world after docker installation

Solve the problem of running hello-world after docker installation

Installed Docker V1.13.1 on centos7.3 using yum

But when running: docker run hello-world, an error is reported:

# docker run docker.io/hello-world container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"Cannot set property TasksAccounting, or unknown property.\"" /usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused \"Cannot set property TasksAccounting, or unknown property.\"".

solve:

The main reason is the compatibility issue of the centos system version. If the system is updated and upgraded, the problem can be solved.

yum update

Before update:

After update:

At this time, restart docker and run hello-world:

Additional knowledge: Deleting the none image

Delete the none image

// Stop all containers docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker stop
// Delete all stopped containers docker ps -a | grep "Exited" | awk '{print $1 }'|xargs docker rm
// Delete all images with tag none docker images|grep none|awk '{print $3 }'|xargs docker rmi
You can edit ~/.zshrc (or ~/.bashrc) to specify the command alias alias dnone="docker images|grep none|awk '{print $3}'|xargs docker rmi"
source ~/.zshrc
 ####################Official deletion command################

The reasons for the generation of the none image are:

how come

Combined with the first picture, let's sort out how dangling images are generated:

The image ID generated when the image is built for the first time is 079dbd67f9f4, and this image will be labeled bolingcavalry/eureka-server:0.0.1-SNAPSHOT by the build tool;

The image ID generated when the image is built for the second time is e40a97f764ef. This image will be labeled bolingcavalry/eureka-server:0.0.1-SNAPSHOT by the build tool.

Docker will remove the tag of 079dbd67f9f4, and 079dbd67f9f4 will become a dangling image, which will be displayed as <none>:<none> in the image list.

The official command provided is as follows to delete it. Note: If the none image is in use, it will not be deleted:

docker image prune

The above article on solving the problem of running hello-world after installing Docker is all the content that the editor shares with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to install WSL2 Ubuntu20.04 on Windows 10 and set up the docker environment
  • Tutorial on installing Docker in Windows 10 subsystem Ubuntu (WSL) (with pictures and text)
  • Problems and solutions for installing Docker on Alibaba Cloud
  • Solution to the error when installing Docker on CentOS version
  • Solutions to Docker installation and error reporting issues under Windows 7
  • Ubuntu vps installs docker and reports an error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Problem solved
  • Installing Docker Desktop reports an error message: WSL 2 installation is incomplete (Solve the error message)

<<:  Go to another file after submitting the form

>>:  Six inheritance methods in JS and their advantages and disadvantages

Recommend

Detailed tutorial on deploying Springboot or Nginx using Kubernetes

1 Introduction After "Maven deploys Springbo...

Summary of Mysql common benchmark commands

mysqlslap Common parameter description –auto-gene...

WeChat applet implements search box function

This article example shares the specific code for...

Complete steps to use mock.js in Vue project

Using mock.js in Vue project Development tool sel...

Introduction to NFS service construction under Centos7

Table of contents 1. Server 2. Client 3. Testing ...

Example of using Vue built-in component keep-alive

Table of contents 1. Usage of keep-alive Example ...

How to improve Idea startup speed and solve Tomcat log garbled characters

Table of contents Preface Idea startup speed Tomc...

Detailed steps to install Mysql5.7.19 using yum on Centos7

There is no mysql by default in the yum source of...

JavaScript mobile H5 image generation solution explanation

Now there are many WeChat public account operatio...

Installing MySQL 8.0.12 based on Windows

This tutorial is only applicable to Windows syste...

Install and configure MySQL 5.7 under CentOS 7

This article tests the environment: CentOS 7 64-b...

How to start the spring-boot project using the built-in linux system in win10

1. Install the built-in Linux subsystem of win10 ...

Solve the problem of the container showing Exited (0) after docker run

I made a Dockerfile for openresty on centos7 and ...