quicknote/gitea/local_docker_registry

40 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 打标规范
https://docs.gitea.com/1.21/usage/packages/container
## build an image with tag
docker build -t {registry}/{owner}/{image}:{tag} .
## name an existing image with tag
docker tag {some-existing-image}:{tag} {registry}/{owner}/{image}:{tag}
## push an image
docker push {registry}/{owner}/{image}:{tag}
# 给现有的image打标
docker tag magicdoc-magicdoc-api:latest 192.168.2.212:3000/tigeren/magicdoc-magicdoc-api
# 推送
docker tag magicdoc-magicdoc-api:latest 192.168.2.212:3000/tigeren/magicdoc-magicdoc-api
docker push 192.168.2.212:3000/tigeren/magicdoc-magicdoc-api
docker tag backend-api:latest 192.168.2.212:3000/tigeren/backend-api
docker push 192.168.2.212:3000/tigeren/backend-api:latest
# 访问查看images
http://192.168.2.212:3000/tigeren/
# orbstack配置 settings -> docker
{
"insecure-registries" : [
"192.168.2.212:3000"
]
}
# Build with registry tag
docker build -t 192.168.2.212:3000/tigeren/nextav:latest .
docker build -t 192.168.2.212:3000/tigeren/nextav:v1.0.0 .
```bash
# Push latest
docker push 192.168.2.212:3000/tigeren/nextav:latest
# Push versioned
docker push 192.168.2.212:3000/tigeren/nextav:v1.0.0