Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the docker mirroring commands

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what are the docker mirroring commands". In the daily operation, I believe many people have doubts about the docker mirroring commands. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what are the docker mirroring commands?" Next, please follow the editor to study!

1 Mirror command

# pull Image docker pull iregistry.docker.com/abc/test:tag_version_1.1# Image list docker images# Delete Image docker rmi IMAGE_ID

2 Container command

# use an image to run a container where 8080 is the host and port 80 is the container docker run-itd-p 8080 REPOSITORY:IMAGE_TAG_V_1.12 / bin/bash# and-name-v options such as docker run-itd-p 8080 bin/bash# 80 IMAGE_ID / bin/bash# container list docker container ls or docker ps# execute a container to enter the docker exec-it CONTAINER_ID / bin/bash inside the container # stop a container docker stop CONTAINER_ID#, delete a container docker rm CONTAINER_ID#, restart a container docker restart CONTAINER_ID

3 add the time zone to the mirror, and add the following statement to the Dockerfile:

ENV TZ=Asia/ShanghaiRUN ln-snf / usr/share/zoneinfo/$TZ / etc/localtime & & echo $TZ > / etc/timezone

Where Asia/Shanghai can be obtained by executing the command:

Curl https://ipapi.co/timezone

2 in the process of mirroring, several problems were encountered

2.1Unreadable system name: failed to open / usr/lib/os-release file: no such file or directory

Time= "2021-01-11T22:40:06.553929993+08:00" level=warning msg= "Could not get operating system name:Error opening / usr/lib/os-release: open / usr/lib/os-release: no such file or directory"

Create this file first

Touch / usr/lib/os-release

Get operating system name information

Lsb_release-aLSB Version:: core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarchDistributor ID: CentOSDescription: CentOS release 6.3 (Final) Release: 6.3Codename: Final

Add information to the file

Echo "CentOS release 6.3 (Final)" | tee / usr/lib/os-releaseCentOS release 6.3 (Final)

2.2, unable to read a file

Time= "2021-01-11T22:40:06.555423028+08:00" level=warning msg= "failed to get endpoint_count map for scope local: open / home/docker/runtime/network/files/local-kv.db: no such file or directory"

Just create this file.

Time= "2021-01-11T22:53:50.178514083+08:00" level=info msg= "Attempting next endpoint for pull after error: failed to write digest data: open / home/docker/runtime/image/overlay/imagedb/content/sha256/.tmp-3f5d7bf137b4dfc4c4da7587deee0bcc949f0b4215dc7c1b2f929865ae2c395d068261124: no such file or directory"

Just create this directory and the file will be written automatically.

At this point, the study of "what are the docker mirroring commands" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report