From fab1102e60cd7411f2f9335e0a5e28d9484db053 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sat, 16 Oct 2021 23:59:13 +0800 Subject: [PATCH] docs: update --- README.md | 19 +++++++++++++++++-- cmd/server.go | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1714486..93d212b 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,29 @@ Use "myip [command] --help" for more information about a command. ## Docker -Server: +### Server ```shell docker pull hub.kumoly.io/tools/myip:latest docker run --name myip-server -d -p 5080:5080 --restart=always hub.kumoly.io/tools/myip ``` -Client: +Or you can use docker-compose.yaml + +```yaml +services: + myip: + image: hub.kumoly.io/tools/myip + container_name: myip-server + restart: always + ports: + - 5080:5080 + volumes: + - /etc/localtime:/etc/localtime:ro +``` + + +### Client ```shell docker pull hub.kumoly.io/tools/myip:latest diff --git a/cmd/server.go b/cmd/server.go index 62e81a5..6322d55 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -19,9 +19,9 @@ var ServerCmd = &cobra.Command{ } var ( - // declared in client // port string + addr string )