mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix incorrect docs for 'docker build'
This commit is contained in:
parent
cb9d0fd3bc
commit
c0b82bd807
1 changed files with 11 additions and 3 deletions
|
@ -15,10 +15,18 @@ steps and commit them along the way, giving you a final image.
|
||||||
1. Usage
|
1. Usage
|
||||||
========
|
========
|
||||||
|
|
||||||
To use Docker Builder, assemble the steps into a text file (commonly referred to
|
To build an image from a source repository, create a description file called `Dockerfile`
|
||||||
as a Dockerfile) and supply this to `docker build` on STDIN, like so:
|
at the root of your repository. This file will describe the steps to assemble
|
||||||
|
the image.
|
||||||
|
|
||||||
``docker build - < Dockerfile``
|
Then call `docker build` with the path of your source repository as argument:
|
||||||
|
|
||||||
|
``docker build .``
|
||||||
|
|
||||||
|
You can specify a repository and tag at which to save the new image if the
|
||||||
|
build succeeds:
|
||||||
|
|
||||||
|
``docker build -t shykes/myapp .``
|
||||||
|
|
||||||
Docker will run your steps one-by-one, committing the result if necessary,
|
Docker will run your steps one-by-one, committing the result if necessary,
|
||||||
before finally outputting the ID of your new image.
|
before finally outputting the ID of your new image.
|
||||||
|
|
Loading…
Reference in a new issue