mirror of
https://github.com/xiaoqidun/goenv.git
synced 2025-04-04 19:27:54 +08:00
Compare commits
2 Commits
292daa8a0c
...
b416798984
Author | SHA1 | Date | |
---|---|---|---|
b416798984 | |||
511e47ab75 |
17
.drone.yml
17
.drone.yml
@ -36,13 +36,24 @@ steps:
|
|||||||
- wget -q -T 180 https://dl.google.com/android/repository/android-ndk-r23-linux.zip
|
- wget -q -T 180 https://dl.google.com/android/repository/android-ndk-r23-linux.zip
|
||||||
- unzip -q android-ndk-r23-linux.zip
|
- unzip -q android-ndk-r23-linux.zip
|
||||||
- rm -f android-ndk-r23-linux.zip
|
- rm -f android-ndk-r23-linux.zip
|
||||||
- name: docker
|
- name: docker1
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: xiaoqidun/goenv
|
repo: xiaoqidun/goenv
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username1
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password1
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
- name: docker2
|
||||||
|
pull: if-not-exists
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
||||||
|
registry: hkccr.ccs.tencentyun.com
|
||||||
|
username:
|
||||||
|
from_secret: docker_username2
|
||||||
|
password:
|
||||||
|
from_secret: docker_password2
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
10
README.md
10
README.md
@ -5,12 +5,12 @@ golang environment
|
|||||||
|
|
||||||
## 拉取镜像
|
## 拉取镜像
|
||||||
```
|
```
|
||||||
docker pull xiaoqidun/goenv:latest
|
docker pull hkccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## 运行镜像
|
## 运行镜像
|
||||||
```
|
```
|
||||||
docker run -it --rm xiaoqidun/goenv
|
docker run -it --rm hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
||||||
```
|
```
|
||||||
|
|
||||||
# 编译项目
|
# 编译项目
|
||||||
@ -19,17 +19,17 @@ docker run -it --rm xiaoqidun/goenv
|
|||||||
|
|
||||||
### linux - bash
|
### linux - bash
|
||||||
```shell
|
```shell
|
||||||
docker run --rm -it -v $(pwd):/go/src/app -w /go/src/app xiaoqidun/goenv
|
docker run --rm -it -v $(pwd):/go/src/app -w /go/src/app hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
||||||
```
|
```
|
||||||
|
|
||||||
### windows - cmd
|
### windows - cmd
|
||||||
```bat
|
```bat
|
||||||
docker run --rm -it -v %cd%:/go/src/app -w /go/src/app xiaoqidun/goenv
|
docker run --rm -it -v %cd%:/go/src/app -w /go/src/app hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
||||||
```
|
```
|
||||||
|
|
||||||
### windows - powershell
|
### windows - powershell
|
||||||
```powershell
|
```powershell
|
||||||
docker run --rm -it -v "${pwd}:/go/src/app" -w /go/src/app xiaoqidun/goenv
|
docker run --rm -it -v "${pwd}:/go/src/app" -w /go/src/app hkccr.ccs.tencentyun.com/xiaoqidun/goenv
|
||||||
```
|
```
|
||||||
|
|
||||||
## 在容器内执行命令进行编译
|
## 在容器内执行命令进行编译
|
||||||
|
2
goenv.go
2
goenv.go
@ -30,7 +30,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
docker := &DockerGoEnv{
|
docker := &DockerGoEnv{
|
||||||
Image: "xiaoqidun/goenv",
|
Image: "hkccr.ccs.tencentyun.com/xiaoqidun/goenv",
|
||||||
Binary: binary,
|
Binary: binary,
|
||||||
WorkDir: "/go/src/app",
|
WorkDir: "/go/src/app",
|
||||||
AutoDelete: true,
|
AutoDelete: true,
|
||||||
|
Reference in New Issue
Block a user