use fqin for container images (#125)

It's generally considered a better practice and it's more portable allowing podman to work without having to modify the name.

Reviewed-on: https://gitea.com/gitea/docs/pulls/125
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
TheFox0x7
2024-12-17 20:23:46 +00:00
committed by Lunny Xiao
parent 2b9cc256ea
commit 7a4e79c937
48 changed files with 236 additions and 236 deletions

View File

@@ -23,7 +23,7 @@ In order to get file rendering through external binaries, their associated packa
If you're using a Docker image, your `Dockerfile` should contain something along this lines:
```docker
FROM gitea/gitea:@dockerVersion@
FROM docker.io/gitea/gitea:@dockerVersion@
[...]
COPY custom/app.ini /data/gitea/conf/app.ini

View File

@@ -358,7 +358,7 @@ If you want traefik to serve your Gitea instance, you can add the following labe
```yaml
gitea:
image: gitea/gitea
image: docker.io/gitea/gitea
...
labels:
- "traefik.enable=true"
@@ -374,7 +374,7 @@ In case you already have a site, and you want Gitea to share the domain name, yo
```yaml
gitea:
image: gitea/gitea
image: docker.io/gitea/gitea
...
labels:
- "traefik.enable=true"

View File

@@ -20,7 +20,7 @@ the official [install instructions](https://docs.docker.com/compose/install/).
## Basics
The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest-rootless`
The most simple setup just creates a volume and a network and starts the `docker.io/gitea/gitea:latest-rootless`
image as a service. Since there is no database available, one can be initialized using SQLite3.
Create a directory for `data` and `config`:
@@ -38,7 +38,7 @@ version: "2"
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -71,7 +71,7 @@ version: "2"
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
@@ -95,7 +95,7 @@ version: "2"
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
+ environment:
+ - GITEA__database__DB_TYPE=mysql
+ - GITEA__database__HOST=db:3306
@@ -115,7 +115,7 @@ services:
+ - db
+
+ db:
+ image: mysql:8
+ image: docker.io/library/mysql:8
+ restart: always
+ environment:
+ - MYSQL_ROOT_PASSWORD=gitea
@@ -136,7 +136,7 @@ version: "2"
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
environment:
+ - GITEA__database__DB_TYPE=postgres
+ - GITEA__database__HOST=db:5432
@@ -156,7 +156,7 @@ services:
+ - db
+
+ db:
+ image: postgres:14
+ image: docker.io/library/postgres:14
+ restart: always
+ environment:
+ - POSTGRES_USER=gitea
@@ -184,7 +184,7 @@ version: "2"
+
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
restart: always
volumes:
- - ./data:/var/lib/gitea
@@ -211,7 +211,7 @@ version: "2"
services:
server:
image: gitea/gitea:@dockerVersion@-rootless
image: docker.io/gitea/gitea:@dockerVersion@-rootless
restart: always
+ user: 1001
volumes:
@@ -283,7 +283,7 @@ docker-compose up -d
- Rename folder (inside volume) gitea to custom
- Edit app.ini if needed
- Set START_SSH_SERVER = true
- Use image gitea/gitea:@dockerVersion@-rootless
- Use image docker.io/gitea/gitea:@dockerVersion@-rootless
## Managing Deployments With Environment Variables

View File

@@ -18,7 +18,7 @@ the official [install instructions](https://docs.docker.com/compose/install/).
## Basics
The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest`
The most simple setup just creates a volume and a network and starts the `docker.io/gitea/gitea:latest`
image as a service. Since there is no database available, one can be initialized using SQLite3.
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
@@ -34,7 +34,7 @@ networks:
services:
server:
image: gitea/gitea:@dockerVersion@
image: docker.io/gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -66,7 +66,7 @@ networks:
services:
server:
image: gitea/gitea:@dockerVersion@
image: docker.io/gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -101,7 +101,7 @@ networks:
services:
server:
image: gitea/gitea:@dockerVersion@
image: docker.io/gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -125,7 +125,7 @@ services:
+ - db
+
+ db:
+ image: mysql:8
+ image: docker.io/library/mysql:8
+ restart: always
+ environment:
+ - MYSQL_ROOT_PASSWORD=gitea
@@ -152,7 +152,7 @@ networks:
services:
server:
image: gitea/gitea:@dockerVersion@
image: docker.io/gitea/gitea:@dockerVersion@
container_name: gitea
environment:
- USER_UID=1000
@@ -176,7 +176,7 @@ services:
+ - db
+
+ db:
+ image: postgres:14
+ image: docker.io/library/postgres:14
+ restart: always
+ environment:
+ - POSTGRES_USER=gitea
@@ -208,7 +208,7 @@ networks:
+
services:
server:
image: gitea/gitea:@dockerVersion@
image: docker.io/gitea/gitea:@dockerVersion@
container_name: gitea
restart: always
networks:
@@ -316,8 +316,8 @@ Gitea will generate new secrets/tokens for every new installation automatically
The following commands will output a new `SECRET_KEY` and `INTERNAL_TOKEN` to `stdout`, which you can then place in your environment variables.
```bash
docker run -it --rm gitea/gitea:1 gitea generate secret SECRET_KEY
docker run -it --rm gitea/gitea:1 gitea generate secret INTERNAL_TOKEN
docker run -it --rm docker.io/gitea/gitea:1 gitea generate secret SECRET_KEY
docker run -it --rm docker.io/gitea/gitea:1 gitea generate secret INTERNAL_TOKEN
```
```yaml

View File

@@ -225,12 +225,12 @@ You can use the docker image from the [docker hub](https://hub.docker.com/r/gite
Just like the binary, you can use the latest nightly build by using the `nightly` tag, while the `latest` tag is the latest stable release.
```bash
docker pull gitea/act_runner:latest # for the latest stable release
docker pull docker.io/gitea/act_runner:latest # for the latest stable release
```
If you want to test newly features, you could also use nightly image
```bash
docker pull gitea/act_runner:nightly # for the latest nightly build
docker pull docker.io/gitea/act_runner:nightly # for the latest nightly build
```
### Configuration
@@ -238,7 +238,7 @@ docker pull gitea/act_runner:nightly # for the latest nightly build
Configuration is optional, but you could also generate config file with docker:
```bash
docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml
docker run --entrypoint="" --rm -it docker.io/gitea/act_runner:latest act_runner generate-config > config.yaml
```
When you are using the docker image, you can specify the configuration file by using the `CONFIG_FILE` environment variable. Make sure that the file is mounted into the container as a volume:
@@ -263,7 +263,7 @@ docker run \
-e GITEA_RUNNER_REGISTRATION_TOKEN=<registration_token> \
-e GITEA_RUNNER_NAME=<runner_name> \
--name my_runner \
-d gitea/act_runner:nightly
-d docker.io/gitea/act_runner:nightly
```
There are more parameters so that you can configure it.
@@ -279,7 +279,7 @@ docker run \
-e GITEA_RUNNER_NAME=<runner_name> \
-e GITEA_RUNNER_LABELS=<runner_labels> \
--name my_runner \
-d gitea/act_runner:nightly
-d docker.io/gitea/act_runner:nightly
```
You may notice that we have mounted the `/var/run/docker.sock` into the container.
@@ -295,7 +295,7 @@ You could also set up the runner using the following `docker-compose.yml`:
version: "3.8"
services:
runner:
image: gitea/act_runner:nightly
image: docker.io/gitea/act_runner:nightly
environment:
CONFIG_FILE: /config.yaml
GITEA_INSTANCE_URL: "${INSTANCE_URL}"
@@ -343,7 +343,7 @@ cache:
docker run \
--name gitea-docker-runner \
-p 8088:8088 \
-d gitea/act_runner:nightly
-d docker.io/gitea/act_runner:nightly
```
### Labels