X Tutup
Skip to content

Commit ed45ddb

Browse files
author
Mary Anthony
committed
Tooling for release build
Tweaking for tooling Adding in the sed for markdown in Dockerfile Should be machine not engine Updating with correct image Signed-off-by: Mary Anthony <mary@docker.com>
1 parent 6d26992 commit ed45ddb

File tree

8 files changed

+188
-19
lines changed

8 files changed

+188
-19
lines changed

docs/DRIVER_SPEC.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<!--[metadata]>
2+
+++
3+
draft=true
4+
title = "Docker Machine"
5+
description = "machine"
6+
keywords = ["machine, orchestration, install, installation, docker, documentation"]
7+
[menu.main]
8+
parent="mn_install"
9+
+++
10+
<![end-metadata]-->
11+
112
# Machine Driver Specification v1
213
This is the standard configuration and specification for version 1 drivers.
314

docs/Dockerfile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
FROM docs/base:latest
2-
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
1+
FROM docs/base:hugo
2+
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
33

44
# to get the git info for this repo
55
COPY . /src
66

7-
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
8-
RUN git reset --hard
7+
COPY . /docs/content/machine/
98

10-
RUN grep "VERSION =" /src/version/version.go | sed 's/.*"\(.*\)".*/\1/' > /docs/VERSION
11-
COPY docs/* /docs/sources/machine/
12-
COPY docs/mkdocs.yml /docs/mkdocs-machine.yml
13-
14-
# Then build everything together, ready for mkdocs
15-
RUN /docs/build.sh
9+
# Sed to process GitHub Markdown
10+
# 1-2 Remove comment code from metadata block
11+
# 3 Remove .md extension from link text
12+
# 4 Change ](/ to ](/project/ in links
13+
# 5 Change ](word) to ](/project/word)
14+
# 6 Change ](../../ to ](/project/
15+
# 7 Change ](../ to ](/project/word)
16+
#
17+
#
18+
RUN find /docs/content/machine -type f -name "*.md" -exec sed -i.old \
19+
-e '/^<!.*metadata]>/g' \
20+
-e '/^<!.*end-metadata.*>/g' \
21+
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
22+
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/machine\//g' \
23+
-e 's/\(\][(]\)\([A-z]*[)]\)/\]\(\/machine\/\2/g' \
24+
-e 's/\(\][(]\)\(\.\.\/\)/\1\/machine\//g' {} \;

docs/Makefile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.PHONY: all binary build cross default docs docs-build docs-shell shell test test-unit test-integration test-integration-cli test-docker-py validate
2+
3+
# env vars passed through directly to Docker's build scripts
4+
# to allow things like `make DOCKER_CLIENTONLY=1 binary` easily
5+
# `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these
6+
DOCKER_ENVS := \
7+
-e BUILDFLAGS \
8+
-e DOCKER_CLIENTONLY \
9+
-e DOCKER_EXECDRIVER \
10+
-e DOCKER_GRAPHDRIVER \
11+
-e TESTDIRS \
12+
-e TESTFLAGS \
13+
-e TIMEOUT
14+
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
15+
16+
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
17+
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
18+
19+
# to allow `make DOCSPORT=9000 docs`
20+
DOCSPORT := 8000
21+
22+
# Get the IP ADDRESS
23+
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
24+
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
25+
HUGO_BIND_IP=0.0.0.0
26+
27+
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
28+
DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
29+
DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
30+
31+
32+
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
33+
34+
# for some docs workarounds (see below in "docs-build" target)
35+
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
36+
37+
default: docs
38+
39+
docs: docs-build
40+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
41+
42+
docs-draft: docs-build
43+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
44+
45+
46+
docs-shell: docs-build
47+
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
48+
49+
50+
docs-build:
51+
# ( git remote | grep -v upstream ) || git diff --name-status upstream/release..upstream/docs ./ > ./changed-files
52+
# echo "$(GIT_BRANCH)" > GIT_BRANCH
53+
# echo "$(AWS_S3_BUCKET)" > AWS_S3_BUCKET
54+
# echo "$(GITCOMMIT)" > GITCOMMIT
55+
docker build -t "$(DOCKER_DOCS_IMAGE)" .

docs/install-machine.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<!--[metadata]>
2+
+++
3+
title = "Docker Machine"
4+
description = "How to install Docker Machine"
5+
keywords = ["machine, orchestration, install, installation, docker, documentation"]
6+
[menu.main]
7+
parent="mn_install"
8+
weight=3
9+
+++
10+
<![end-metadata]-->
11+
12+
## Install Docker Machine
13+
14+
Docker Machine is supported on Windows, OS X, and Linux and is installable as one
15+
standalone binary. The links to the binaries for the various platforms and
16+
architectures are below:
17+
18+
- [Windows - 32bit](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_windows-386.exe)
19+
- [Windows - 64bit](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_windows-amd64.exe)
20+
- [OSX - x86_64](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_darwin-amd64)
21+
- [OSX - (old macs)](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_darwin-386)
22+
- [Linux - x86_64](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64)
23+
- [Linux - i386](https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-386)
24+
25+
### OSX and Linux
26+
27+
To install on OSX or Linux, download the proper binary to somewhere in your
28+
`PATH` (e.g. `/usr/local/bin`) and make it executable. For instance, to install on
29+
most OSX machines these commands should suffice:
30+
31+
```
32+
$ curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_darwin-amd64 > /usr/local/bin/docker-machine
33+
$ chmod +x /usr/local/bin/docker-machine
34+
```
35+
36+
For Linux, just substitute "linux" for "darwin" in the binary name above.
37+
38+
Now you should be able to check the version with `docker-machine -v`:
39+
40+
```
41+
$ docker-machine -v
42+
machine version 0.2.0
43+
```
44+
45+
In order to run Docker commands on your machines without having to use SSH, make
46+
sure to install the Docker client as well, e.g.:
47+
48+
```
49+
$ curl -L https://get.docker.com/builds/Darwin/x86_64/docker-latest > /usr/local/bin/docker
50+
```
51+
52+
### Windows
53+
54+
Currently, Docker recommends that you install and use Docker Machine on Windows
55+
with [msysgit](https://msysgit.github.io/). This will provide you with some
56+
programs that Docker Machine relies on such as `ssh`, as well as a functioning
57+
shell.
58+
59+
When you have installed msysgit, start up the terminal prompt and run the
60+
following commands. Here it is assumed that you are on a 64-bit Windows
61+
installation. If you are on a 32-bit installation, please substitute "i386" for
62+
"x86_64" in the URLs mentioned.
63+
64+
First, install the Docker client binary:
65+
66+
```
67+
$ curl -L https://get.docker.com/builds/Windows/x86_64/docker-latest.exe > /bin/docker
68+
```
69+
70+
Next, install the Docker Machine binary:
71+
72+
```
73+
$ curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_windows-amd64.exe > /bin/docker-machine
74+
```
75+
76+
Now running `docker-machine` should work.
77+
78+
```
79+
$ docker-machine -v
80+
machine version 0.2.0
81+
```

docs/index.md renamed to docs/machine-overview.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
---
2-
page_title: Docker Machine
3-
page_description: Working with Docker Machine
4-
page_keywords: docker, machine, amazonec2, azure, digitalocean, google, openstack, rackspace, softlayer, virtualbox, vmwarefusion, vmwarevcloudair, vmwarevsphere, exoscale
5-
---
1+
<!--[metadata]>
2+
+++
3+
title = "Overview of Docker Machine"
4+
description = "Introduction and Overview of Machine"
5+
keywords = ["docker, machine, amazonec2, azure, digitalocean, google, openstack, rackspace, softlayer, virtualbox, vmwarefusion, vmwarevcloudair, vmwarevsphere, exoscale"]
6+
[menu.main]
7+
parent="smn_workw_machine"
8+
+++
9+
<![end-metadata]-->
610

711

812
# Docker Machine
@@ -1638,4 +1642,4 @@ select a `debian-8-x64` image on DigitalOcean you would supply the following:
16381642
If you change the base image for a provider, you may also need to change
16391643
the SSH user. For example, the default Red Hat AMI on EC2 expects the
16401644
SSH user to be `ec2-user`, so you would have to specify this with
1641-
`--amazonec2-ssh-user ec2-user`.
1645+
`--amazonec2-ssh-user ec2-user`.

docs/mkdocs.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

experimental/b2d_migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ When migrating a Boot2Docker VM to Docker Machine the Boot2Docker VM is left int
6363

6464
** `ls` will show all machines including their status
6565

66-
*** the `url` command reports the entire Docker URL including the IP / Hostname
66+
*** the `url` command reports the entire Docker URL including the IP / Hostname

experimental/b2d_migration_tasks.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<!--[metadata]>
2+
+++
3+
draft=true
4+
title = "Docker Machine"
5+
description = "machine"
6+
keywords = ["machine, orchestration, install, installation, docker, documentation"]
7+
[menu.main]
8+
parent="mn_install"
9+
+++
10+
<![end-metadata]-->
11+
112
# Boot2Docker Migration
213
This document is a rough guide to what will need to be completed to support
314
migrating from boot2docker-cli to Machine. It is not meant to be a user guide

0 commit comments

Comments
 (0)
X Tutup