Docker FAQ

Docker FAQ

Docker only maps ports to IPv6 but not to IPv4

Start a docker service and only display the ipv6 port information. IPv4 has no port information, which makes it impossible to access the service externally through IPv4, and reports a Connection refused error

Workaround

Disable ipv6 on the server

vim /etc/default/grub

Add ipv6.disable=1 in line 6

GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"

Reconfigure grub and restart the server

grub2-mkconfig -o /boot/grub2/grub.cfg
reboot

WARNING: bridge-nf-call-iptables is disabled

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

Workaround

vim /etc/sysctl.conf

# Add the following two lines net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1

# Then make it effective sysctl -p /etc/sysctl.conf

# Verify docker info

Docker Acceleration

Recommend using Alibaba Cloud Docker to accelerate

Usage process: https://cr.console.aliyun.com/cn-hangzhou/instances/repositories

Find the image accelerator

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
 "registry-mirrors": ["https://sziho4ql.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

The above is the detailed content of solving common Docker problems. For more information about solving Docker problems, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Use of environment variables in Docker and solutions to common problems
  • Docker solves the problem that the terminal cannot input Chinese
  • Docker exposes port 2375, causing server attacks and solutions
  • Install Jenkins with Docker and solve the problem of initial plugin installation failure
  • Solve the problem that the docker container cannot ping the external network
  • When setting up Jenkins in Docker environment, the console log shows garbled Chinese characters when building tasks
  • Solution to the problem that docker logs cannot be retrieved
  • Share the problem of Ubuntu 19 not being able to install docker source

<<:  Vue+Element UI realizes the encapsulation of drop-down menu

>>:  Vue implements the sample code of adding, deleting, modifying and checking the tree structure

Recommend

MySQL 5.5.56 installation-free version configuration method

The configuration method of MySQL 5.5.56 free ins...

Understand the principles and applications of JSONP in one article

Table of contents What is JSONP JSONP Principle J...

Detailed explanation of the use of umask under Linux

I recently started learning Linux. After reading ...

MySQL binlog opening steps

Binlog is a binary log file that is used to recor...

linux exa command (better file display experience than ls)

Install Follow the README to install The document...

Methods of adaptive web design (good access experience on mobile phones)

1. Add the viewport tag to the HTML header. At th...

JavaScript implements long image scrolling effect

This article shares the specific code of JavaScri...

Vue implements scroll loading table

Table of contents Achieve results Rolling load kn...

Explanation of Truncate Table usage

TRUNCATE TABLE Deletes all rows in a table withou...

Introduction and usage examples of ref and $refs in Vue

Preface In JavaScript, you need to use document.q...

Detailed explanation of JSONObject usage

JSONObject is just a data structure, which can be...

Apache Spark 2.0 jobs take a long time to finish when they are finished

Phenomenon When using Apache Spark 2.x, you may e...

Some wonderful uses of URL objects in JavaScript

Table of contents Preface Parsing parameters Modi...

Mybatis statistics of the execution time of each SQL statement

background I am often asked about database transa...