Skip to content

Commit b397700

Browse files
committed
Update image name and documentation
1 parent aface12 commit b397700

7 files changed

+55
-24
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
## Kube-Pipework
3+
**_A docker image of jpetazzo's pipework optimized for Kubernetes_**
4+
5+
![](https://img.shields.io/docker/build/kvaps/pipework.svg)
6+
7+
* **[Documentation](docs/0.%20Introduction.md)**
8+
* **[Kubernetes example](docs/3.%20Examples.md#kubernetes)**
9+
* **[DockerHub Page](https://registry.hub.docker.com/u/kvaps/pipework/)**
10+
11+
### Status
12+
13+
Actually this project is a fork of [dreamcat4/pipework](https://github.com/dreamcat4/docker-images/tree/master/pipework), it uses updated image and includes some fixes for make pipework working with Kubernetes annotations, and add [VLAN support for linux bridges](https://github.com/jpetazzo/pipework/pull/227).
14+
15+
Despite all the great features of Kubernetes, Pipework is still the easiest way to pastrough a static IP or physical interface into a container. Nevertheless, I would suggest you to avoid using pipework in situations where you can do without it.
16+
17+
Check **[bridget](https://github.com/kvaps/bridget/)** - this cni-plugin was created under impressed with Pipework, it is more native for Kubernetes and provides similar L2-network connectivity (except static IPs).
18+
19+
Of course you can use pipework with bridget together as well.
20+
21+
### Requirements
22+
23+
* Requires Docker 1.8.1
24+
* Needs to be run in privileged mode etc.
25+
26+
### Credit
27+
28+
* [Pipework](https://github.com/jpetazzo/pipework) - Jerome Petazzoni
29+
* Inspiration for the `host_routes` feature came from [this Article](http://blog.oddbit.com/2014/08/11/four-ways-to-connect-a-docker/), by Lars Kellogg-Stedman
30+
* [Docker wrapper for Pipework](https://github.com/dreamcat4/docker-images/tree/master/pipework) - Dreamcat4
31+
* [Kubernetes support](https://github.com/kvaps/kube-pipework) - kvaps

docs/0. Introduction.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*<div align=right>Pipework reference:* ***[`jpetazzo/pipework`](https://github.com/jpetazzo/pipework/blob/master/README.md)</div>***
2-
**[`Readme`](README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
2+
**[`Readme`](../README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
33

44
## Docker-Pipework
55
**_A docker image of jpetazzo's pipework_**
@@ -8,13 +8,13 @@ Recommended with the `crane` orchestration tool. [See here for an example](3. Ex
88

99
This docker image encapsulates the awesome [jpetazzo/pipework](https://github.com/jpetazzo/pipework) networking configuration script. You can now run pipework as a docker container. The configurable [run modes](2. Usage.md#run-modes) determine how the pipework command is invoked on your docker containers.
1010

11-
Specifying an environment variable named [`pipework_cmd`](4. Config.md#pipework_cmd) on your container will tell the `dreamcat4/pipework` image to run jpetazzo's `pipework` script. And with those specific pipework flags.
11+
Specifying an environment variable named [`pipework_cmd`](4. Config.md#pipework_cmd) on your container will tell the `kvaps/pipework` image to run jpetazzo's `pipework` script. And with those specific pipework flags.
1212

1313
There are many reasons to use the pipework tool. It may be to give your container an external IP address, or a macvlan L2 ethernet bridge, a particular [MAC address](https://github.com/jpetazzo/pipework/blob/master/README.md#custom_mac), a dynamic or a static [DHCP lease](https://github.com/jpetazzo/pipework/blob/master/README.md#dhcp). To be able to [manually configure the IP address](https://github.com/jpetazzo/pipework/blob/master/README.md#no_ip) from inside the container. To set up [host routes](4. Config.md#host_routes) so that those IPs are reachable / visible on the docker host. Or to [create a private bridge](https://github.com/jpetazzo/pipework/blob/master/README.md#lamp) between N other containers].
1414

1515
Or perhaps you want to do all of those things! For multiple pipework commands on 1 container use the simple [`.*pipework_cmd.*` regexp matching](4. Config.md#globbing). e.g. `pipework_cmd1=`, `pipework_cmd2=` etc.
1616

17-
Requires privileged mode, access to the host PID namespace, and the host's networking stack. ~ But only on the `dreamcat4/pipework` container, not on any of your application containers.
17+
Requires privileged mode, access to the host PID namespace, and the host's networking stack. ~ But only on the `kvaps/pipework` container, not on any of your application containers.
1818

1919
## Readme
2020

@@ -48,11 +48,11 @@ Should you experience any problems with this image, there are a couple of things
4848

4949
* Pipework has it's own requirements. Which can be found in the official pipework documentation at [jpetazzo/pipework](https://github.com/jpetazzo/pipework/blob/master/README.md). For example `dhclient` is needed for the DHCP feature and so on.
5050

51-
* If the issue isn't with pipework, it may be todo with my docker image, which is what surrounds and encapsulates the `pipework` script. Then please open a [new issue](https://github.com/dreamcat4/docker-images/issues/new) here on my github repository.
51+
* If the issue isn't with pipework, it may be todo with my docker image, which is what surrounds and encapsulates the `pipework` script. Then please open a [new issue](https://github.com/kvaps/pipework/issues/new) here on my github repository.
5252

5353
### Credit
5454

5555
* [Pipework](https://github.com/jpetazzo/pipework) - Jerome Petazzoni
5656
* Inspiration for the `host_routes` feature came from [this Article](http://blog.oddbit.com/2014/08/11/four-ways-to-connect-a-docker/), by Lars Kellogg-Stedman
57-
* [This Docker Image](https://github.com/dreamcat4/docker-images/tree/master/pipework), a wrapper for Pipework - Dreamcat4
58-
57+
* [Docker wrapper for Pipework](https://github.com/dreamcat4/docker-images/tree/master/pipework) - Dreamcat4
58+
* [Kubernetes support](https://github.com/kvaps/kube-pipework) - kvaps

docs/1. Install.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
*<div align=right>Pipework reference:* ***[`jpetazzo/pipework`](https://github.com/jpetazzo/pipework/blob/master/README.md)</div>***
2-
**[`Readme`](README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
2+
**[`Readme`](../README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
33

44
## Install
55

6-
docker pull dreamcat4/pipework
6+
docker pull kvaps/pipework
77

88
This image is based on `Ubuntu-14.04 trusty`. And was tested on `lxc-docker-1.6.0` and `Ubuntu-15.04 Desktop`.
99

@@ -26,7 +26,7 @@ This image is based on `Ubuntu-14.04 trusty`. And was tested on `lxc-docker-1.6.
2626

2727
Needs `docker-1.6.0` (or higher). `crane 1.1.0` (or higher). `docker-compose-1.3.0` (or higher).
2828

29-
* This image `dreamcat4/pipework` requires the following docker run arguments: `--privileged=true`, `--pid=host`, `--net=host`, and `-v /var/run/docker.sock:/docker.sock`. Or else pipework won't be able to set up networking on your other containers.
29+
* This image `kvaps/pipework` requires the following docker run arguments: `--privileged=true`, `--pid=host`, `--net=host`, and `-v /var/run/docker.sock:/docker.sock`. Or else pipework won't be able to set up networking on your other containers.
3030

3131
This image will flat out not work on any previous version of Docker before `1.5.0`. As the pipework script needs to see the host pid namespace, which requires `--pid=host` flag. The first version of Docker to implement this flag is Docker `1.5.0`. However since docker-compose version `1.3.0` requires docker `1.6.0` we have upped the overall docker requirement to `1.6.0`. *This should not be an issue for most installations now that Docker `1.6.0` has been released.*
3232

docs/2. Usage.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*<div align=right>Pipework reference:* ***[`jpetazzo/pipework`](https://github.com/jpetazzo/pipework/blob/master/README.md)</div>***
2-
**[`Readme`](README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
2+
**[`Readme`](../README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
33

44
## Usage
55

@@ -45,7 +45,7 @@ Full documentation on the pipework script can be found at [jpetazzo/pipework](ht
4545
Cmdline Usage (docker run):
4646

4747
docker run -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host \
48-
dreamcat4/pipework --help
48+
kvaps/pipework --help
4949

5050
<a name="compose_usage"/>
5151

@@ -71,7 +71,7 @@ Expaination of each of the permitted run modes:
7171

7272
Manually specified commands. Just as you would run `pipework` script from the command line on your host system. Does not accept @TEMPLATE@ [macro expansions](#macro-expansions).
7373

74-
If you execute `docker run dreamcat4/pipework <args>` on the command line:
74+
If you execute `docker run kvaps/pipework <args>` on the command line:
7575

7676
* The arguments `<args>` are passed directly into jpetazzo's pipework script.
7777
* A [`host_route`](4. Config.md#host_route) may be set up. If the option `-e host_route=true` was specified.
@@ -102,7 +102,7 @@ Or in non-interactive environments:
102102
* But only if the container also fulfils other user-configurable filtering criteria.
103103
* If the `pipework_cmd` is permitted to be executed, then the `pipework` script will be invoked immediately upon that container. As soon as it can be serviced by the processing loop.
104104
* `daemon` mode is recommended in combination with `batch` mode, for orchestration environments such as docker compose, crane, and kubernetes.
105-
* You can run pipework's `daemon` mode continuously from system boot. If you prefer to keep the `dreamcat4/pipework` image outside of your orchestration tool's `.yml` file.
105+
* You can run pipework's `daemon` mode continuously from system boot. If you prefer to keep the `kvaps/pipework` image outside of your orchestration tool's `.yml` file.
106106
* Create the pipework container with `--restart=always` flag to be started automatically at boot time (recommended).
107107
* Be sure to specify `batch` mode too, since the container startup order is not guaranteed, and client containers may be started before the pipework container itself has a change to drop into `daemon` mode and start listening.
108108

docs/3. Examples.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*<div align=right>Pipework reference:* ***[`jpetazzo/pipework`](https://github.com/jpetazzo/pipework/blob/master/README.md)</div>***
2-
**[`Readme`](README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
2+
**[`Readme`](../README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
33

44
## Examples
55

@@ -25,7 +25,7 @@
2525

2626
```sh
2727
docker run -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host \
28-
dreamcat4/pipework --help
28+
kvaps/pipework --help
2929

3030
Syntax:
3131
pipework <hostinterface> [-i containerinterface] <guest> <ipaddr>/<subnet>[@default_gateway] [macaddr][@vlan]
@@ -43,7 +43,7 @@ docker run --name='mycontainer' --net=none -e 'pipework_cmd=eth0 @CONTAINER_NAME
4343
**Pipework Container:**
4444
```sh
4545
docker run --restart=always -v /var/run/docker.sock:/docker.sock --privileged=true --pid=host --net=host \
46-
-e run_mode=batch,daemon -e host_routes=true dreamcat4/pipework
46+
-e run_mode=batch,daemon -e host_routes=true kvaps/pipework
4747
```
4848

4949
<a name="compose_example"/>
@@ -59,7 +59,7 @@ myapp:
5959
- pipework_cmd=eth0 @CONTAINER_NAME@ 192.168.1.101/[email protected] 0a:00:01:01:01:01
6060

6161
pipework:
62-
image: dreamcat4/pipework
62+
image: kvaps/pipework
6363
restart: always
6464
volumes:
6565
- /var/run/docker.sock:/docker.sock
@@ -87,7 +87,7 @@ containers:
8787
- pipework_cmd=eth0 @CONTAINER_NAME@ 192.168.1.101/[email protected] 0a:00:01:01:01:01
8888
8989
pipework:
90-
image: dreamcat4/pipework
90+
image: kvaps/pipework
9191
run:
9292
restart: always
9393
volume:
@@ -137,7 +137,7 @@ containers:
137137
- pipework_cmd_that_creates_private_bridge= br1 -i eth2 @CONTAINER_NAME@ dhcp
138138
139139
pipework:
140-
image: dreamcat4/pipework
140+
image: kvaps/pipework
141141
run:
142142
restart: always
143143
volume:
@@ -188,7 +188,7 @@ spec:
188188
hostIPC: true
189189
hostNetwork: true
190190
containers:
191-
- image: dreamcat4/pipework
191+
- image: kvaps/pipework
192192
name: pipework
193193
securityContext:
194194
privileged: true

docs/4. Config.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*<div align=right>Pipework reference:* ***[`jpetazzo/pipework`](https://github.com/jpetazzo/pipework/blob/master/README.md)</div>***
2-
**[`Readme`](README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
2+
**[`Readme`](../README.md)** / **[`Intro`](0.%20Introduction.md)** / **[`Install`](1.%20Install.md)** / **[`Usage`](2.%20Usage.md)** / **[`Examples`](3.%20Examples.md)** / **[`Config`](4.%20Config.md)**
33

44

55
## Config
@@ -48,7 +48,7 @@ Configuration of `pipework` is performed by setting environment variables. There
4848

4949
Environment variables can be set by appending the `docker run` command with successive `-e` switches. Or by adding them to the existing service definitions in your orchestration tool's `.yml` file.
5050

51-
When a `dreamcat4/pipework` container is run, it will boot up, then `docker inspect` other running containers on the same docker host. As dictated by the user-specified [`run_mode`](#run_mode) and certain other kinds of configurable [filter criteria 1](#event_filters), and [2](#key). For any inspected container, if an environment variable matching the [globbing battern](#globbing) of [`pipework_cmd=`](#pipework_cmd) is encountered. Then those command line arguments are passed on to @jpetazzo's [pipework](https://github.com/jpetazzo/pipework/blob/master/README.md) script for processing.
51+
When a `kvaps/pipework` container is run, it will boot up, then `docker inspect` other running containers on the same docker host. As dictated by the user-specified [`run_mode`](#run_mode) and certain other kinds of configurable [filter criteria 1](#event_filters), and [2](#key). For any inspected container, if an environment variable matching the [globbing battern](#globbing) of [`pipework_cmd=`](#pipework_cmd) is encountered. Then those command line arguments are passed on to @jpetazzo's [pipework](https://github.com/jpetazzo/pipework/blob/master/README.md) script for processing.
5252

5353
<a name="global"/>
5454

@@ -88,7 +88,7 @@ It would mean that the Docker Host can now access the container's `eth1` interfa
8888

8989
### On the Pipework container
9090

91-
* Setting environment variables on the `dreamcat4/pipework` container is how you set global configuration options.
91+
* Setting environment variables on the `kvaps/pipework` container is how you set global configuration options.
9292
* You may omit the optional prefix `pipework_` at the beginning of any environment variable names.
9393
* For example: `debug=true` is the same as `pipework_debug=true`. Enabling either option will have the same effect.
9494
* Most users only need to set the [`run_mode`](#run_mode) and [`host_routes`](#host_routes) options.

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
_pipework_image_name="dreamcat4/pipework"
3+
_pipework_image_name="kvaps/pipework"
44
_global_vars="run_mode host_routes host_route_arping host_route_protocols up_time key cmd sleep debug event_filters cleanup_wait retry_delay inter_delay route_add_delay"
55

66
for _var in $_global_vars; do

0 commit comments

Comments
 (0)