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

Python MySQL database table modification and query

Python connects to MySQL to modify and query data...

How to set a fixed IP address in CentOS7 virtual machine

Since my development environment is to install Ce...

Commonplace talk about the usage of MYSQL pattern matching REGEXP and like

like LIKE requires the entire data to match, whil...

Vue local component data sharing Vue.observable() usage

As components become more detailed, you will enco...

Multiple methods to modify MySQL root password (recommended)

Method 1: Use the SET PASSWORD command MySQL -u r...

Mysql query the most recent record of the sql statement (optimization)

The worst option is to sort the results by time a...

Simple example of HTML text formatting (detailed explanation)

1. Text formatting: This example demonstrates how...

JavaScript implements asynchronous acquisition of form data

This article example shares the specific code for...

How to get/calculate the offset of a page element using JavaScript

question By clicking a control, a floating layer ...

Web lesson plans, lesson plans for beginners

Teaching Topics Web page Applicable grade Second ...

Web page custom selection box Select

Everyone may be familiar with the select drop-dow...

MySql learning day03: connection and query details between data tables

Primary Key: Keyword: primary key Features: canno...

Complete step record of Vue encapsulation of general table components

Table of contents Preface Why do we need to encap...

Detailed explanation of angular two-way binding

Table of contents Bidirectional binding principle...