master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
1
branch
3
tags
Code
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
https://gitee.com/dwxdfhx/aliyunDDns
linux环境或windows环境下都可以,这里使用虚拟机里的centos6.5,在虚拟机里配置好git,
git ssh,docker,golang ,go mod 代理。
export GOPROXY=https://goproxy.io
cd /go/src/交叉编译的项目
go mod download
go mod vendor
#进入容器
docker run -it --entrypoint /bin/bash karalabe/xgo-latest
docker run --rm -it -v "$PWD"/runapp:/build -v "$PWD"/vendor:/go/src -v "$PWD":/go/src/AliYunDns \
-e TARGETS=windows/amd64 karalabe/xgo-latest AliYunDns
docker run --rm -it -v "$PWD"/runapp:/build -v "$PWD"/vendor:/go/src -v "$PWD":/go/src/AliYunDns \
-e TARGETS=linux/amd64 karalabe/xgo-latest AliYunDns
#docker知识补充:
# -v 意思: /test:/soft 本地/tect目录作为容器的/soft目录
# -e 给容器传递变量参数 变量前是 --
# --rm 容器退出时候清理挂在目录下内容
# -it 进入了命令交互界面
#交叉编译平台版本知识补充
#amd64 和 i386 是什么意思?
# 可以直接理解为amd64为64位系统,i386为32位系统.因为是amd把64位率先引进桌面系统的,英特尔也是要追随amd并且保持兼容,
# 一般在软件包里包含这样的字符。(直接一直以为amd64表示是amd处理器才能用...)
#TARGETS=windows/amd64,darwin/amd64,linux/amd64 可以简化编译,提高编译速度
#TARGETS=windows/*,darwin/*,linux/*