update readme
This commit is contained in:
114
README.md
114
README.md
@@ -48,6 +48,8 @@ docker tag catalog26 registry.chopark.home/catalog26
|
|||||||
4. Push to Registry
|
4. Push to Registry
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
|
docker login registry.chopark.home
|
||||||
|
|
||||||
docker push registry.chopark.home/catalog26
|
docker push registry.chopark.home/catalog26
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -61,6 +63,10 @@ On Linux, edit `/etc/docker/daemon.json`:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo systemctl restart docker
|
||||||
|
```
|
||||||
|
|
||||||
On Windows (Docker Desktop):
|
On Windows (Docker Desktop):
|
||||||
- Open Docker Desktop
|
- Open Docker Desktop
|
||||||
- Go to Settings > Docker Engine
|
- Go to Settings > Docker Engine
|
||||||
@@ -101,4 +107,112 @@ sudo crictl version
|
|||||||
|
|
||||||
# Pull image
|
# Pull image
|
||||||
sudo crictl pull registry.chopark.home/catalog26
|
sudo crictl pull registry.chopark.home/catalog26
|
||||||
|
```
|
||||||
|
|
||||||
|
## Push Code to Gitea
|
||||||
|
|
||||||
|
Push code to `git.chopark.home` and get the result.
|
||||||
|
|
||||||
|
### Generate a New ssh Key
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh-keygen -t ed2551 -C "<EMAIL>" -f ~/.ssh/id_ed25519
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update ssh config
|
||||||
|
|
||||||
|
Update the config file for ssh: `~/.ssh/config`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Append the following
|
||||||
|
|
||||||
|
Host git.chopark.home
|
||||||
|
Hostname git.chopark.home
|
||||||
|
User git
|
||||||
|
Port 2222
|
||||||
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
```
|
||||||
|
|
||||||
|
### Push code to Gitea
|
||||||
|
|
||||||
|
Create a new repository in git.chopark.home.
|
||||||
|
|
||||||
|
From the local machine, add gitea as a remote.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git remote add gitea git@git.chopark.home:wesscho/Catalog26.git
|
||||||
|
|
||||||
|
git push -u gitea master
|
||||||
|
```
|
||||||
|
|
||||||
|
## Push a Docker Image to Gitea Container Registry
|
||||||
|
|
||||||
|
### Update your app.ini
|
||||||
|
|
||||||
|
Open the `gitea/gitea/conf/app.ini` file and look for or add the following:
|
||||||
|
|
||||||
|
```Ini, TOML
|
||||||
|
[packages]
|
||||||
|
ENABLED = true
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
; This allows the 'Packages' tab to show up on your repo page
|
||||||
|
ENABLE_PACKAGES = true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure the Max Upload Size
|
||||||
|
|
||||||
|
Docker images are huge. By default, Gitea might limit uploads to 32MB, which will cause your docker push to fail. Add or update this section:
|
||||||
|
|
||||||
|
```Ini, TOML
|
||||||
|
[attachment]
|
||||||
|
; Increase to 5GB or whatever fits your needs
|
||||||
|
MAX_SIZE = 5120
|
||||||
|
```
|
||||||
|
|
||||||
|
### Adjust Nginx Proxy Manager (NPM)
|
||||||
|
|
||||||
|
Since you are using NPM, it has its own upload limit. If you don't change this, Nginx will give you a 413 Request Entity Too Large error when you push an image.
|
||||||
|
|
||||||
|
1. Open your NPM Admin UI.
|
||||||
|
2. Edit your Gitea Proxy Host.
|
||||||
|
3. Go to the Advanced tab.
|
||||||
|
4. Paste this line into the "Custom Nginx Configuration" box:
|
||||||
|
|
||||||
|
```Nginx
|
||||||
|
client_max_body_size 5G;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Restart Gitea
|
||||||
|
|
||||||
|
For the app.ini changes to take effect, restart your container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose restart server
|
||||||
|
```
|
||||||
|
|
||||||
|
### Verify and Login
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker login git.chopark.home
|
||||||
|
```
|
||||||
|
|
||||||
|
### Push an Image
|
||||||
|
|
||||||
|
If necessary, pull down the image from the `registry.chopark.home` registry.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull registry.chopark.home/catalog26
|
||||||
|
```
|
||||||
|
|
||||||
|
Tag the image for the Gitea registry
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker tag registry.chopark.home/catalog26 git.chopark.home/wesscho/catalog26
|
||||||
|
```
|
||||||
|
|
||||||
|
Push it to your Gitea instance.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker push git.chopark.home/wesscho/catalog26
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user