You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # tml-in-docker #
  2. Dockerized TML Web System
  3. ### 安裝Docker
  4. $ wget -qO- https://get.docker.com/ | sh
  5. $ sudo usermod -aG docker $(whoami)
  6. $ sudo systemctl enable docker.service
  7. $ sudo systemctl start docker.service
  8. ### 安裝Docker Compose
  9. $ sudo yum install epel-release
  10. $ sudo yum install -y python-pip
  11. $ sudo pip install docker-compose
  12. ### 安裝Rancher CLI
  13. ```bash
  14. curl -LkSs https://github.com/rancher/cli/releases/download/v0.6.11/rancher-linux-amd64-v0.6.11.tar.gz | tar -xz && mv ./rancher-v0.6.11/rancher /bin/rancher && rm -rf ./rancher-v0.6.11
  15. ```
  16. ### 由Private register移除Docker Image
  17. ```bash
  18. registry='localhost:5000'
  19. name='my-image'
  20. curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
  21. curl -sSL -I \
  22. -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
  23. "http://${registry}/v2/${name}/manifests/$(
  24. curl -sSL "http://${registry}/v2/${name}/tags/list" | jq -r '.tags[0]'
  25. )" \
  26. | awk '$1 == "Docker-Content-Digest:" { print $2 }' \
  27. | tr -d $'\r' \
  28. )"
  29. ```