Compare commits
2 Commits
fab1102e60
...
9a51cc02d2
Author | SHA1 | Date |
---|---|---|
Evan Chen | 9a51cc02d2 | |
Evan Chen | 7d4fadf5d6 |
19
README.md
19
README.md
|
@ -37,14 +37,29 @@ Use "myip [command] --help" for more information about a command.
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Server:
|
### Server
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker pull hub.kumoly.io/tools/myip:latest
|
docker pull hub.kumoly.io/tools/myip:latest
|
||||||
docker run --name myip-server -d -p 5080:5080 --restart=always hub.kumoly.io/tools/myip
|
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
|
```shell
|
||||||
docker pull hub.kumoly.io/tools/myip:latest
|
docker pull hub.kumoly.io/tools/myip:latest
|
||||||
|
|
|
@ -19,9 +19,9 @@ var ServerCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
||||||
// declared in client
|
// declared in client
|
||||||
// port string
|
// port string
|
||||||
|
|
||||||
addr string
|
addr string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue