Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
d1961e78
Commit
d1961e78
authored
Jun 30, 2015
by
Danny Guinther
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be more explicit about sequence definition usage in docker builder docs
parent
18e29e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
4 deletions
+49
-4
website/source/docs/builders/docker.html.markdown
website/source/docs/builders/docker.html.markdown
+49
-4
No files found.
website/source/docs/builders/docker.html.markdown
View file @
d1961e78
...
...
@@ -117,7 +117,10 @@ _exported_. More specifically, if you set `export_path` in your configuration.
If you set
`commit`
, see the next section.
The example below shows a full configuration that would import and push
the created image:
the created image. This is accomplished using a sequence definition (a
collection of post-processors that are treated as as single pipeline, see
[
Post-Processors
](
/docs/templates/post-processors.html
)
for more information):
```
javascript
{
...
...
@@ -134,6 +137,12 @@ the created image:
}
```
In the above example, the result of each builder is passed through the defined
sequence of post-processors starting first with the
`docker-import`
post-processor which will import the artifact as a docker image. The resulting
docker image is then passed on to the
`docker-push`
post-processor which handles
pushing the image to a container repository.
If you want to do this manually, however, perhaps from a script, you can
import the image using the process below:
...
...
@@ -146,9 +155,12 @@ and `docker push`, respectively.
## Using the Artifact: Committed
If you committed your container to an image, you probably want to tag,
save, push, etc. Packer can do this automatically for you. An example is
shown below which tags and pushes the image:
If you committed your container to an image, you probably want to tag, save,
push, etc. Packer can do this automatically for you. An example is shown below
which tags and pushes an image. This is accomplished using a sequence
definition (a collection of post-processors that are treated as as single
pipeline, see
[
Post-Processors
](
/docs/templates/post-processors.html
)
for more
information):
```
javascript
{
...
...
@@ -165,6 +177,39 @@ shown below which tags and pushes the image:
}
```
In the above example, the result of each builder is passed through the defined
sequence of post-processors starting first with the
`docker-tag`
post-processor
which tags the committed image with the supplied repository and tag information.
Once tagged, the resulting artifact is then passed on to the
`docker-push`
post-processor which handles pushing the image to a container repository.
Going a step further, if you wanted to tag and push an image to multiple
container repositories, this could be accomplished by defining two,
nearly-identical sequence definitions, as demonstrated by the example below:
```
javascript
{
"
post-processors
"
:
[
[
{
"
type
"
:
"
docker-tag
"
,
"
repository
"
:
"
mitchellh/packer
"
,
"
tag
"
:
"
0.7
"
},
"
docker-push
"
],
[
{
"
type
"
:
"
docker-tag
"
,
"
repository
"
:
"
hashicorp/packer
"
,
"
tag
"
:
"
0.7
"
},
"
docker-push
"
]
]
}
```
## Dockerfiles
This builder allows you to build Docker images _without_ Dockerfiles.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment