跳转到内容

欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。

Linux:Docker:修订间差异

来自WHY42
imported>Soleverlee
以“=基本命令= 安装现在直接下载dmg安装就可以了。目测会和VirtualBox什么的冲突,导致死机... <source lang="bash"> docker images docker sear...”为内容创建页面
 
imported>Soleverlee
小 Soleverlee移动页面Osx:Docker至Linux:Docker,不留重定向
(没有差异)

2017年5月12日 (五) 02:17的版本

基本命令

安装现在直接下载dmg安装就可以了。目测会和VirtualBox什么的冲突,导致死机...

docker images
docker search ubuntu
docker pull ubuntu
docker pull 
docker inspect f7b3f317ec73 #列出详细信息

查看所有tags

#!/bin/bash

if [ $# -lt 1 ]
then
cat << HELP

dockertags  --  list all tags for a Docker image on a remote registry.

EXAMPLE: 
    - list all tags for ubuntu:
       dockertags ubuntu

    - list all php tags containing apache:
       dockertags php apache

HELP
fi

image="$1"
tags=`wget -q https://registry.hub.docker.com/v1/repositories/${image}/tags -O -  | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n'  | awk -F: '{print $3}'`

if [ -n "$2" ]
then
    tags=` echo "${tags}" | grep "$2" `
fi

echo "${tags}"