You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docker/docker-compose.md
+40-1Lines changed: 40 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,16 @@
1
1
# Docker-Compose
2
+
2
3
...
3
4
4
5
## Networking
6
+
5
7
By default Docker-Compose will create a new network for the given compose file. You can change the behavior by defining custom networks in your compose file.
8
+
6
9
### Create and assign custom network
10
+
7
11
...
8
12
*Example:*
13
+
9
14
```yaml
10
15
networks:
11
16
custom-network:
@@ -15,18 +20,24 @@ services:
15
20
networks:
16
21
- custom-network
17
22
```
23
+
18
24
### Use existing networks
25
+
19
26
If you want to use an existing Docker network for your compose files, you can add the `external: true` parameter in your compose file
20
27
*Example:*
28
+
21
29
```yaml
22
30
networks:
23
31
existing-network:
24
32
external: true
25
33
```
26
34
27
35
## Volumes
28
-
Volumes are data storage objects that Docker containers can use for persistent storage.
36
+
37
+
Volumes are data storage objects that Docker containers can use for persistent storage.
38
+
29
39
### Create and map static volume(s)
40
+
30
41
```yaml
31
42
volumes:
32
43
my-volume:
@@ -36,8 +47,11 @@ services:
36
47
volumes:
37
48
- my-volume:/path-in-container
38
49
```
50
+
39
51
These volumes are stored in `/var/lib/docker/volumes`.
52
+
40
53
### Create volume that is a CIFS mount to external share
0 commit comments