Update docs for removal of 'weave run'

This commit is contained in:
Bryan Boreham authored and Marc CARRE committed 2017-04-12 12:15:42 +01:00
1 parent 98e6571059
commit 481214776b
8 files changed
+29 -48

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ menu_order: 70
Weave Net automatically assigns containers a unique IP address
across the network, and also releases that address when the container
exits. Unless you explicitly specify an address, this occurs for all
invocations of the `run`, `start`,
invocations of the
`attach`, `detach`, `expose`, and `hide` commands. Weave Net can also assign
addresses in multiple subnets.
@@ -20,6 +20,15 @@ where,
>Note If you are using the Weave Docker API proxy, it will have modified `DOCKER_HOST` to point to the proxy and therefore you will have to pass `-e WEAVE_CIDR=none` to start a container that _doesn't_ get automatically attached to the weave network for the purposes of this example.
If `weave attach` sees the container has a hostname with a domain-name, it
will add those into WeaveDNS.
host1$ docker run -dti --name=c1 --hostname=c1.weave.local weaveworks/ubuntu
host1$ weave attach c1
10.32.0.1
host1$ weave dns-lookup c1
10.32.0.1
### Dynamically Detaching Containers
A container can be detached from a subnet, by using the `weave detach` command:
+3 -4
View File
@@ -6,8 +6,7 @@ menu_order: 50
The Docker API proxy automatically attaches containers to the Weave
network when they are started using the ordinary Docker
[command-line interface](https://docs.docker.com/reference/commandline/cli/)
or the [remote API](https://docs.docker.com/reference/api/docker_remote_api/),
instead of `weave run`.
or the [remote API](https://docs.docker.com/reference/api/docker_remote_api/).
### <a name="attaching-containers"></a>Attaching Containers to a Weave Network
@@ -30,9 +29,9 @@ Note that if a Docker container is started with the --net flag, then the Weave D
is automatically disabled and is not used to attach containers.
See [Integrating Docker via the Network Plugin](/site/plugin.md).
**3.** Containers can also be attached to the Weave network with `weave run` commands. This method also
**3.** Containers can also be attached to the Weave network with `weave attach` commands. This method also
does not use the Weave Docker API Proxy.
See [Launching Containers With Weave Run (without the Proxy)](/site/weave-docker-api/launching-without-proxy.md).
See [Dynamically Attaching and Detaching Containers](/site/using-weave/dynamically-attach-containers.md).
### <a name="weave-api-proxy"></a>Setting Up The Weave Net Docker API Proxy
@@ -3,44 +3,18 @@ title: Launching Containers With Weave Run (without the Proxy)
menu_order: 50
---
In prior versions of Weave Net, we supported a command `weave run`
which would run a container and attach it to the Weave Network.
If you don't want to use the proxy, you can also launch
containers on to the Weave network using `weave run`:
This command always had limitations, and now we have Docker plugins
and the Weave Net Docker API Proxy which do not have those
limitations, we have removed `weave run`.
$ weave run -ti weaveworks/ubuntu
If you have scripts using `weave run`, you can achieve exactly the
same effect by combining `docker run` and `weave attach`; see
[Dynamically Attaching and Detaching
Containers](/site/using-weave/dynamically-attach-containers.md) for
details.
The arguments after `run` are passed through to `docker run`. Therefore you
can freely specify whatever Docker options you need.
Once the container is started, `weave run` attaches it to the Weave network, and in
this example, it obtains an automatically allocated IP.
You can specify IP addresses manually instead:
$ weave run 10.2.1.1/24 -ti weaveworks/ubuntu
`weave run` rewrites `/etc/hosts` in the same way
[the proxy does](/site/weave-docker-api/name-resolution-proxy.md). If you need to keep
the original file, specify `--no-rewrite-hosts` when running
the container:
$ weave run --no-rewrite-hosts 10.2.1.1/24 -ti weaveworks/ubuntu
There are some limitations to starting containers using `weave run`:
* containers are always started in the background, i.e. the equivalent
of always supplying the -d option to docker run
* the --rm option to docker run, for automatically removing containers
after they stop, is not available
* the Weave network interface may not be available immediately on
container startup.
Finally, there is a `weave start` command which starts existing
containers using `docker start` and attaches them to the Weave network.
**See Also**
* [Setting Up The Weave Docker API Proxy](/site/weave-docker-api.md)
* [Securing Docker Communications With TLS](/site/weave-docker-api/securing-proxy.md)
* [Name Resolution via `/etc/hosts`](/site/weave-docker-api/name-resolution-proxy.md)
The `weave start` and `weave restart` commands have also been removed,
for the same reasons.
-1
View File
@@ -64,4 +64,3 @@ route, add the `--no-multicast-route` flag to `weave launch-proxy`.
* [Setting Up The Weave Docker API Proxy](/site/weave-docker-api.md)
* [Securing Docker Communications With TLS](/site/weave-docker-api/securing-proxy.md)
* [Launching Containers With Weave Run (without the Proxy)](/site/weave-docker-api/launching-without-proxy.md)
+1 -1
View File
@@ -39,7 +39,7 @@ the hostname is not in the weaveDNS domain, the container is *not*
registered, but it will still use weaveDNS for resolution.
To disable an application container's use of weaveDNS, add the
`--without-dns` option to `weave run` or `weave launch-proxy`. To
`--without-dns` option to `weave launch-proxy`. To
disable weaveDNS itself, launch weave with the `--no-dns` option.
**See Also**
+2 -2
View File
@@ -6,7 +6,7 @@ menu_order: 10
The weaveDNS service running on every host acts as the nameserver for
containers on that host. It learns about hostnames for local containers
from the proxy and from the `weave run` command.
from the proxy and from the `weave attach` command.
If a hostname is in the `.weave.local` domain, then weaveDNS records the association of that
name with the container's Weave Net IP address(es) in its in-memory
@@ -37,7 +37,7 @@ In the event that weaveDNS is launched in this way, it's important that
other calls to `weave` also specify the bridge device:
```
$ sudo DOCKER_BRIDGE=someother weave run ...
$ sudo DOCKER_BRIDGE=someother weave attach ...
```
**See Also**
+1 -1
View File
@@ -11,7 +11,7 @@ The following topics are discussed:
## <a name="domain-search-path"></a>Configuring the domain search paths
If you don't supply a domain search path (with `--dns-search=`), Weave
Net (via the [proxy](/site/weave-docker-api.md) or via `weave run`)
Net (via the [proxy](/site/weave-docker-api.md) or via `weave attach`)
tells a container to look for "bare" hostnames, like `pingme`, in its
own domain (or in `weave.local` if it has no domain).