Docker Cookbook


| Chapter 2: Image Creation and Sharing



Download 6,31 Mb.
Pdf ko'rish
bet49/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   45   46   47   48   49   50   51   52   ...   260
Bog'liq
Docker Cookbook

48 | Chapter 2: Image Creation and Sharing


Discussion
Properly tagging an image is an important part of sharing it on Docker Hub (see
Recipe 2.9
) or using a private registry (see 
Recipe 2.11
). The 
docker tag
help infor‐
mation is pretty succint but shows the proper naming convention, which references
the proper namespace, be it local, on Docker Hub, or on a private registry:
$ docker tag -h
Usage: docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
Tag an image into a repository
-f, --force=false Force
2.7 Migrating from Vagrant to Docker with the Docker
Provider
Problem
You have been using 
Vagrant
for your testing and development work and would like
to reuse some of your Vagrantfiles to work with Docker.
Solution
Use the Vagrant Docker 
provider
. You can keep writing Vagrant files to bring up new
containers and develop your Dockerfiles.
Here is an example Vagrantfile that uses the Docker provider:
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION
=
"2"
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
config
.
vm
.
provider
"docker"
do
|
d
|
d
.
build_dir
=
"."
end
config
.
vm
.
network
"forwarded_port"
,
guest
:
5000
,
host
:
5000
end
The 
build_dir
option looks for a Dockerfile in the same directory as the Vagrantfile.
Vagrant then issues a 
docker build
in turn, and starts the container:

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   45   46   47   48   49   50   51   52   ...   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