Skip to content

Commit

Permalink
docs: improve documentation readability and setup instructions
Browse files Browse the repository at this point in the history
- Split a long paragraph into two for better readability
- Add instructions for installing and configuring Watchtower

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Jun 20, 2024
1 parent 28716d7 commit 29909d4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ docker run --name my-python-app --link my-redis:redis -d my-python-app-image

在這個指令中,`--link` 參數的語法為 `--link <container_name>:<alias>`,其中 `<container_name>` 是要連結的容器名稱,而 `<alias>` 是在my-python-app容器內部使用的別名。這樣,my-python-app 容器就可以透過 redis 這個別名來連接到 my-redis 容器。

請注意,雖然 `--link` 參數仍然可以使用,但官方建議使用自定義的網路(Custom Networks)或者Docker Compose來取代--link參數,因為這些方法提供了更靈活和強大的容器連結功能。
請注意,雖然 `--link` 參數仍然可以使用,但官方建議使用自定義的網路(Custom Networks)或者Docker Compose來取代--link參數,因為這些方法提供了更靈活和強大的容器
連結功能。

## Install watchtower

```bash
watchtower:
image: containrrr/watchtower
restart: always
volumes:
- $HOME/.docker/config.json:/config.json
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 5 --cleanup
```

0 comments on commit 29909d4

Please sign in to comment.