Docker use notes for your own reference

Source: Internet
Author: User
Tags curl docker run
================================Configure pull mirroring (Ubuntu:/etc/default/docker) without HTTPS links
#--------------------------------------------vsersion 1----------------------------------------# docker upstart and Sysvinit configuration file
# Customize Location of Docker binary (especially for development testing). #DOCKER = "/usr/local/bin/docker"
# Use Docker_opts to modify the daemon startup options. docker_opts= "--dns 8.8.8.8--dns 8.8.4.4--insecure-registry" #整个网段都可以不使用https
# If You need Docker to use an HTTP proxy, it can also is specified here. #export http_proxy= "http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go. #export tmpdir= "/mnt/bigdrive/docker-tmp" #----------------------------------vsersion 2----------------------------------------------------# docker upstart and Sysvinit configuration file
# Customize Location of Docker binary (especially for development testing). #DOCKER = "/usr/local/bin/docker"
# Use Docker_opts to modify the daemon startup options. #配置自己默认地址 docker_opts= "$DOCKER _opts--registry-mirror=http://b6056ba3.m.daocloud.io--dns 8.8.8.8--dns- Insecure-registry 10.0.0.0/16 "
# If You need Docker to use an HTTP proxy, it can also is specified here. #export http_proxy= "http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go. #export tmpdir= "/mnt/bigdrive/docker-tmp" ======================================= docker-registry API #查看所有仓库
Curl-x get Http://10.0.99.2:5000/v1/search Curl-x got Http://10.0.99.2:5000/v1/search?q=cen//band on condition CEN
#列出某一仓库的的所有内容 curl-x get http://10.0.99.2:5000/v1/repositories/library/centos/tags #删除某个标签 curl-x DELETE http://10.0. 99.2:5000/v1/repositories/library/centos7/tags/latest #删除某个仓库 curl-x DELETE http://10.0.99.2:5000/v1/repositories/ library/centos7/# --------------------------------------------------------------------------------------------- #docker-registry APIip= "http://10.0.99.2:5000"
if [= = ' Search '];then curl-x get $IP/v1/search #搜索所有仓库 fi if [$ = ' tag-list '];then curl-x get $IP/v1/reposi Tories/$2/tags #列出某一个仓库的所有标签和image-id fi if [$ = ' delete '];then curl-x delete $IP/v1/repositories/$2/#删除某一个仓库 fi i  f [= = = ' Tag-del '];then curl-x get $IP/v1/repositories/$2/tags/$3 #删除某一个标签, but the mirror is still on the hard drive fi if [$ = ' Tag-image-id ' ];then curl-x get $IP/v1/repositories/$2/tags/$3 #取得某一镜像的image-id fi
=========================================== #使用docker-registry #启动docker-registryDocker run-d-e settings_flavor=dev-e storage_path=/tmp/registry-v/root/app/docker-images-db:/tmp/registry-p 5,000:5 M registry
Docker run-d--name registry-e settings_flavor=dev-e storage_path=/tmp/registry-v :/tmp/registry-p 5000:5000 Registry
#启动cadvisorDocker run--VOLUME=/VAR/RUN:/VAR/RUN:RW--volume=/sys:/sys:ro--volume=/var/lib/docker/:/var/lib/docker:ro-- publish=8014:8080--detach=true--name=cadvisor1 Google/cadvisor:latest


===============================================================#使用前端webui管理仓库 Docker run \
-d \ e env_docker_registry_host=10.0.99.2 \ e env_docker_registry_port=5000 \ p 8080:80 \ Konradkleine/docker-r Egistry-frontend

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.