docker basic guide
来源:互联网 发布:mac chown命令详解 编辑:程序博客网 时间:2024/06/12 23:14
- install docker
apt-get install docker
also workswget -qO- https://get.docker.com/ | sh
run hello-world image
docker run hello-world
docker
tells os you are using docker program
run
a subcommand that creates & run a Docker container
hello-world
tells docker which image to load into the container
(1)find it locally
(2)if not available,find it on the hub
(3)load the image into the container and ran it
docker images
(1) write a Dockerfile, add lines to the file like this:
[1]
FROM docker/whalesay:latest
whick image your image is based on.
[2]
RUN apt-get -y update && apt-get install -y fortunes
add the
fortunes
program to the image. [3]
CMD /usr/games/fortune -a | cowsay
tells the
fortunes
program to pass a nifty quote to the cowsay
program. (2) build an imange from your Dockerfile
docker bulid -t docker-whale .
(don’t forget . period)
this command takes theDockerfile
in the current dir,and bulids an imge called docker-whale on your local machine.
(1) tag and push the image
docker images
list images on your local machine, and pick up the IMAGE ID
specified. docker tag 5452ad69d37f zhangjianbo1989/docker-whale:latest
docker
use the docker program
tag
a subcommand that tags an image
5452ad69d37f
IMAGE ID
zhangjianbo1989
your account name from Docker Hub.
docker-whale
the image name
latest
version label
docker push zhangjianbo1989/docker-whale
docker rmi
0 0
- docker basic guide
- Docker Basic
- 1st_uC/OS-II Basic Programmers’Guide
- Docker and Databases - a Hands-on Guide
- TFS 2008: A basic guide to Team Build 2008
- Visual Basic .NET and the .NET Platform: An Advanced Guide
- Basic Statistics Using SAS Enterprise Guide: A Primer
- Basic Guide on IPTables (Linux Firewall) Tips / Commands
- iOS App Programming Guide => Design Basic & Core Objects
- Dynamic Range Compression- Basic Tutorial Guide for Beginners
- Part 2: Language Guide (The Basics, Basic Operators)
- Introduction to Engine user guide(介绍Docker引擎手册)
- Docker—从入门到实践—Welcome to the Docker user guide
- Guide
- guide
- guide
- guide
- Visual Basic Programmer's Guide to the .NET Framework Class Library
- Objective-c语言_基本数据类型封装和拆包
- 解决Xcode 9.2系统真机测试时出现 could not find developer disk image问题
- Java线程面试题 Top 50
- android 自动生成ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi图片的工具
- 传智播客助你尽快走出大学毕业后的迷茫
- docker basic guide
- 先安装Linux再安装windows双系统引导项处理
- Android使用PrinterShare实现蓝牙打印
- Activity生命周期一般解析
- [POJ 2411] Mondriaan's Dream
- 51单片机复位(高电平复位)
- spring框架(三)junit单元测试
- POJ-1860 Currency Exchange
- Labview的文件路径:当前VI路径和应用程序目录的区别