Docker Cookbook


| Chapter 1: Getting Started with Docker



Download 6,31 Mb.
Pdf ko'rish
bet25/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   21   22   23   24   25   26   27   28   ...   260
Bog'liq
Docker Cookbook

18 | Chapter 1: Getting Started with Docker


$ ./docker-machine rm foobar
See Also
• Official 
documentation
1.10 Using Docker Experimental Binaries
Problem
You want to use an experimental feature or a patch that was contributed to the
Docker upstream code.
Solution
Use the Docker experimental binaries. You can download the binaries or use the
experimental channel that is updated nightly.
Get the nightly builds of Docker in the form of Linux distribution packages:
$ wget -qO- https://experimental.docker.com/ | sh
$ docker version | grep Version
Version: 1.8.0-dev
Version: 1.8.0-dev
Or you can grab the nightly built binaries directly; for example on 64-bit systems:
$ wget https://experimental.docker.com/builds/Linux/x86_64/docker-latest
$ chmod +x docker-latest
$ ./docker-latest version | grep Version
Version: 1.8.0-dev
Version: 1.8.0-dev
If you want to use this binary by default, follow 
Recipe 4.4
.
See Also
• Docker 
experimental channel
announced recently
• Running experimental docker 
binaries
1.10 Using Docker Experimental Binaries | 19


1.11 Running Hello World in Docker
Problem
You have access to a Docker host and want to run your first container. You want to
learn the various life cycles of a container. As an example, you want to run a container
and echo 
Hello World
in it.
Solution
Typing 
docker
at the prompt returns the usage of the 
docker
command:
$ docker
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
...
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
...
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save an image to a tar archive
search Search for an image on the Docker Hub
start Start a stopped container
stop Stop a running container
tag Tag an image into a repository
top Lookup the running processes of a container
unpause Unpause a paused container
version Show the Docker version information
wait Block until a container stops, then print its exit code
You have already seen the 
docker ps
command, which lists all running containers.
You’ll explore many more commands in other recipes of this book. To get started, you
want to run a container. Let’s get straight to it and use 
docker run
:
$ docker run busybox echo hello world
Unable to find image 'busybox' locally
busybox:latest: The image you are pulling has been verified
511136ea3c5a: Pull complete
df7546f9f060: Pull complete
e433a6c5b276: Pull complete
e72ac664f4f0: Pull complete
Status: Downloaded newer image for busybox:latest
hello world

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   21   22   23   24   25   26   27   28   ...   260




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish