Skip to content

Commit 508aca1

Browse files
Improve Docker container name (#13077)
* Improve Docker container name Use a better Docker container name than the default 'server' * Changing to gitea and use recommended v3 Docker-compose Use `gitea` as container name. And use version 3 of the docker-compose, which should now be used: https://docs.docker.com/compose/compose-file/compose-versioning/ Co-authored-by: techknowlogick <[email protected]>
1 parent 9b81193 commit 508aca1

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Also be aware that the tag `:latest` will install the current development versio
3434
For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`.
3535

3636
```yaml
37-
version: "2"
37+
version: "3"
3838

3939
networks:
4040
gitea:
@@ -43,6 +43,7 @@ networks:
4343
services:
4444
server:
4545
image: gitea/gitea:latest
46+
container_name: gitea
4647
environment:
4748
- USER_UID=1000
4849
- USER_GID=1000
@@ -65,7 +66,7 @@ the port section. It's common to just change the host port and keep the ports wi
6566
the container like they are.
6667
6768
```diff
68-
version: "2"
69+
version: "3"
6970

7071
networks:
7172
gitea:
@@ -74,6 +75,7 @@ networks:
7475
services:
7576
server:
7677
image: gitea/gitea:latest
78+
container_name: gitea
7779
environment:
7880
- USER_UID=1000
7981
- USER_GID=1000
@@ -97,7 +99,7 @@ To start Gitea in combination with a MySQL database, apply these changes to the
9799
`docker-compose.yml` file created above.
98100

99101
```diff
100-
version: "2"
102+
version: "3"
101103

102104
networks:
103105
gitea:
@@ -106,6 +108,7 @@ networks:
106108
services:
107109
server:
108110
image: gitea/gitea:latest
111+
container_name: gitea
109112
environment:
110113
- USER_UID=1000
111114
- USER_GID=1000
@@ -147,7 +150,7 @@ To start Gitea in combination with a PostgreSQL database, apply these changes to
147150
the `docker-compose.yml` file created above.
148151

149152
```diff
150-
version: "2"
153+
version: "3"
151154

152155
networks:
153156
gitea:
@@ -156,6 +159,7 @@ networks:
156159
services:
157160
server:
158161
image: gitea/gitea:latest
162+
container_name: gitea
159163
environment:
160164
- USER_UID=1000
161165
- USER_GID=1000
@@ -198,7 +202,7 @@ create the required volume. You don't need to worry about permissions with
198202
named volumes; Docker will deal with that automatically.
199203

200204
```diff
201-
version: "2"
205+
version: "3"
202206

203207
networks:
204208
gitea:
@@ -211,6 +215,7 @@ networks:
211215
services:
212216
server:
213217
image: gitea/gitea:latest
218+
container_name: gitea
214219
restart: always
215220
networks:
216221
- gitea
@@ -306,9 +311,12 @@ UID/GID as the container values `USER_UID`/`USER_GID`. You should also create th
306311
`/var/lib/gitea` on the host, owned by the `git` user and mounted in the container, e.g.
307312

308313
```
314+
version: "3"
315+
309316
services:
310317
server:
311318
image: gitea/gitea:latest
319+
container_name: gitea
312320
environment:
313321
- USER_UID=1000
314322
- USER_GID=1000

0 commit comments

Comments
 (0)