Browse Source

docs: update docker build command

dev
Dnomd343 2 years ago
parent
commit
fdc8d7665f
  1. 2
      CMakeLists.txt
  2. 10
      README.md

2
CMakeLists.txt

@ -31,7 +31,7 @@ endmacro()
set(VERSION "") set(VERSION "")
git_tag(VERSION) git_tag(VERSION)
if(VERSION STREQUAL "") # without git tag if(VERSION STREQUAL "") # without git tag
message(FATAL_ERROR "Git command not found") message(FATAL_ERROR "Unable to get version information")
endif() endif()
############################################################### ###############################################################

10
README.md

@ -605,16 +605,20 @@ sys 0m0.005s
```bash ```bash
$ git clone https://github.com/dnomd343/ClearDNS.git $ git clone https://github.com/dnomd343/ClearDNS.git
···
$ cd ./ClearDNS/ $ cd ./ClearDNS/
$ docker build -t cleardns . $ docker build -t cleardns .
···
``` ```
### 交叉构建 ### 交叉构建
```bash ```bash
docker buildx build -t dnomd343/cleardns --platform="linux/amd64,linux/arm64" https://github.com/dnomd343/ClearDNS.git --push $ git clone https://github.com/dnomd343/ClearDNS.git
$ cd ./ClearDNS/
$ docker buildx build
-t dnomd343/cleardns \
-t ghcr.io/dnomd343/cleardns \
-t registry.cn-shenzhen.aliyuncs.com/dnomd343/cleardns \
--platform="linux/amd64,linux/arm64" . --push
``` ```
## 许可证 ## 许可证

Loading…
Cancel
Save