Skip to content

Commit 8eadf67

Browse files
committed
add Docker Macvlan network documentation
1 parent ae7271b commit 8eadf67

File tree

2 files changed

+69
-1
lines changed

2 files changed

+69
-1
lines changed

content/docs/tools/teddyCloud/setup/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Minimal teddyCloud version for this docu is release v0.6.0! Please ensure you ar
1212
The docker container automatically generates the server certificates on first run. You can extract the ```certs/server/ca.der``` for your box after that.
1313

1414
An example [docker-compose.yaml can be found within the docker subdir.](https://github.com/toniebox-reverse-engineering/teddycloud/blob/master/docker/docker-compose.yaml)
15-
Please beware that port 443 cannot be remapped and you cannot use a reverse proxy like nginx or traefik without passing through the TLS (complex, not recommended). The client certificate authentication needs to be done by teddyCloud. Also, there is no SNI. If you are using docker, you can use macvlan to give the teddyCloud container a dedicated IP address (recommended).
15+
Please beware that port 443 cannot be remapped and you cannot use a reverse proxy like nginx or traefik without passing through the TLS (complex, not recommended). The client certificate authentication needs to be done by teddyCloud. Also, there is no SNI. If you are using docker, you can [use macvlan](docker-macvlan) to give the teddyCloud container a dedicated IP address (recommended).
1616

1717
## Preparation
1818
First of all, prepare your teddyCloud installation. On first run, teddyCloud generates its certificates. During the generation you cannot access the webinterface. This can take several minutes! Be sure you check the log output!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: "Docker Macvlan"
3+
description: "Use Docker Macvlan for a dedicated IP"
4+
bookCollapseSection: true
5+
headless: true
6+
---
7+
# Docker Macvlan Setup
8+
9+
## Prerequisites
10+
11+
Make sure, you have an IP address in your network, which does not get served by the local DHCP server.
12+
13+
## Assumptions for this example
14+
15+
In this example
16+
17+
* the IP address 192.168.1.3 is reserved for teddycloud
18+
* in a network 192.168.0.0/23
19+
* with the router having the address 192.168.0.1
20+
21+
22+
## Create Docker Macvlan Network
23+
24+
You create a Docker Macvlan network with the following command:
25+
26+
```
27+
docker network create \
28+
--driver macvlan \
29+
--subnet=192.168.0.0/23 \
30+
--gateway=192.168.0.1 \
31+
--ip-range=192.168.1.3/32 \
32+
-o parent=eth1 \
33+
teddycloud_macvlan
34+
```
35+
36+
Of course you have to adapt all the parameters to your network.
37+
38+
## Adjust docker-compose.yaml
39+
40+
After the Docker Macvlan network has been created, it can be used in the `docker-compose.yaml`.
41+
42+
### Add Docker Macvlan network
43+
44+
At the end of you `docker-compose.yaml` add the following lines to add the Docker Macvlan network:
45+
46+
```
47+
networks:
48+
teddycloud_macvlan:
49+
external: true
50+
```
51+
52+
### Use Docker Macvlan in teddycloud service
53+
54+
Add the networks secion to your teddycloud service, which are the last three lines of the following snippet
55+
56+
```
57+
services:
58+
teddycloud:
59+
60+
networks:
61+
teddycloud_macvlan:
62+
ipv4_address: 192.168.1.3
63+
```
64+
65+
## Done
66+
67+
Save the `docker-compose.yaml` file and start the container.
68+

0 commit comments

Comments
 (0)