Skip to content

Commit c8943fd

Browse files
committed
Update README.md
1 parent 35b3356 commit c8943fd

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
Docker-build is a command line tool for building docker images and uploading
2-
them to the registry. It extends the low level '''docker build''' by building
2+
them to the registry. It extends the low level *docker build* by building
33
images with a Dockerfile, Vagrantfile or a rootfs archive.
44

55
Once built the image can be uploaded to a registry, which could be the official
66
docker registry or your private registry.
77

8+
Getting started - Installation
9+
==============================
10+
$ virtualenv venv
11+
$ source venv/bin/activate
12+
$ pip install docker-build
813

914
Sample build and upload
1015
=======================
@@ -35,19 +40,17 @@ Registry configuration
3540
======================
3641

3742
There are two ways to configure registries. Either by command line argument
38-
'''-r''' or in a registry configuration file.
43+
*-r* or in a registry configuration file with the argument *--rc*.
3944

40-
$ docker-build -r https://foo:bar@localhost:5000
41-
42-
$ docker-build -r staging:localhost:5000
45+
$ docker-build -r staging=localhost:5000
4346

4447
$ docker-build --rc Dockerbuild.registries
4548

4649

4750
Registry configuration file
4851
---------------------------
4952

50-
Registries can be defined in the file '''docker-build.registry''' in the same
53+
Registries can be defined in the file **docker-build.registry** in the same
5154
folder where the docker-build.images can be found or as global settings in one
5255
of the pathes:
5356

@@ -136,3 +139,19 @@ build from root filesystem
136139

137140
Image('my-app', cmd='/opt/my-app/bin/app', base=root_image)
138141

142+
with environment variables
143+
--------------------------
144+
145+
#!docker-build -c
146+
#
147+
# Uses environment variables.
148+
#
149+
# Example call:
150+
# REVISION=1.2.3 ./environment.images
151+
# REVISION=2.3.4 docker-build -c environment.images
152+
153+
import os
154+
155+
revision = os.environ['REVISION']
156+
157+
Image('hello-world:%s' % revision, base=Image('hello-world'))

0 commit comments

Comments
 (0)