Compare commits

...

83 Commits

Author SHA1 Message Date
73b7995128 feat(更新版本): 更新到1.24.2
All checks were successful
continuous-integration/drone/push Build is passing
2025-04-02 10:49:08 +08:00
3a386feeec feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-05 17:57:55 +08:00
8b42279af8 feat(更新版本): 更新到1.24.0
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-13 03:00:13 +08:00
68fa94a8c6 feat(升级版本): 升级到1.24rc3
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-11 21:08:03 +08:00
7ca2c9ba9e feat(更新镜像): 更新镜像到1.24rc2
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-17 22:36:27 +08:00
9c7e885d02 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-04 13:40:17 +08:00
87b9d8a4a6 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-08 17:56:25 +08:00
929bf8d314 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-08 09:39:30 +08:00
7e6396a7a1 feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-09-12 14:27:32 +08:00
eb130c2a28 fix(修复更新): 修复更新
All checks were successful
continuous-integration/drone/push Build is passing
2024-08-15 03:29:41 +08:00
7722f887a8 feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
2024-08-15 03:25:19 +08:00
7e366ab17e feat(镜像脚本): 更新镜像脚本
All checks were successful
continuous-integration/drone/push Build is passing
2024-07-17 09:04:16 +08:00
e7736b345f feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2024-07-16 23:47:48 +08:00
5adf05c471 feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2024-06-22 23:01:47 +08:00
29ef0d38de feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2024-06-05 09:35:31 +08:00
318f5681f4 feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-11 17:13:26 +08:00
8ccb320a78 feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-04-07 10:09:07 +08:00
cf514fbbb7 feat(升级镜像): 更新Go和NDK
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-13 16:05:37 +08:00
6210f6b195 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-02-13 00:05:11 +08:00
67c96bff22 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-10 11:21:41 +08:00
2f4abe9768 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-12-06 09:52:44 +08:00
e764bc1608 feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-08 11:36:38 +08:00
a1f938c872 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-15 23:23:33 +08:00
2f577fda9e feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-06 23:29:27 +08:00
ae2335889f feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-29 15:35:25 +08:00
5f65de79bb feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-07 09:47:35 +08:00
6a695572f6 feat(打包节点): 更改打包节点
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-09 15:26:35 +08:00
37567594e4 feat(国内打包): 使用国内打包机器
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-08-09 12:40:25 +08:00
cb354523ac docs(说明文档): 说明文档命令更换为中国境内镜像地址
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-08-09 01:06:30 +08:00
573a8a29b1 feat(升级版本): 升级版本 2023-08-09 01:05:02 +08:00
902a8f847f feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-02 22:34:19 +08:00
55cba6a372 fix(修复打包): 修复打包
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 10:37:36 +08:00
c8f32acd2e feat(打包镜像): 为镜像安装wget
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-12 10:33:19 +08:00
3742865087 feat(调整镜像): 调整镜像
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-12 10:26:27 +08:00
47bc5ab50c feat(打包区域): 切换打包区域
Some checks reported errors
continuous-integration/drone/push Build is failing
continuous-integration/drone Build was killed
2023-07-12 10:12:38 +08:00
b70271d8a6 feat(国内打包): 国内打包
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-12 10:10:35 +08:00
3d2d480d19 feat(更新版本): 更新版本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
2023-07-12 10:00:10 +08:00
e638e215cd feat(区域打包): 新增区域打包标记
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-07 02:18:17 +08:00
2045a1013a feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-07 00:55:27 +08:00
f42201d3a2 chore(构建脚本): 构建脚本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2023-07-06 21:25:58 +08:00
293c42f6d4 chore(构建脚本): 更新构建脚本
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-06 21:22:13 +08:00
367aa982b1 feat(构建脚本): 更新构建脚本
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-07-06 21:19:37 +08:00
3bc3e7bad7 feat(更新镜像): 裁剪镜像,删除goenv命令
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-06 21:05:25 +08:00
87cf150e7b feat(部署脚本): alpine默认wget不支持-4参数
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2023-06-08 09:30:38 +08:00
ce70d9b7fb feat(部署脚本): wget仅使用ipv4
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-08 09:28:20 +08:00
5db552bc1f feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
2023-06-08 09:08:20 +08:00
3f3874ce9e feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-03 23:44:11 +08:00
8f4b4797b9 feat(镜像大小): 删除镜像缓存文件
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-13 10:28:33 +08:00
82fb7da3ed feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2023-04-05 23:48:55 +08:00
ba1e42cc94 feat(升级版本): 升级版本
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2023-03-09 00:27:17 +08:00
0ef1dc7735 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-16 23:54:47 +08:00
47413e5e66 feat(更新依赖): 更新依赖
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-14 23:19:42 +08:00
e465b02956 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-02 12:07:27 +08:00
24587098e1 feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-13 21:43:43 +08:00
99bc4ecb6a feat(国内镜像): 添加国内镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-10 01:04:23 +08:00
94294c1af4 feat(更新镜像): 更新镜像
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-06 17:03:06 +08:00
bb526937ed feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-08 14:51:38 +08:00
80862d685c feat(更新镜像): 去掉对镜像意义不大的工具
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-07 16:51:20 +08:00
beca7e7d40 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-12-07 14:47:47 +08:00
3e0434781a feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 10:17:04 +08:00
3fdcce75de feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2022-10-17 21:18:16 +08:00
a245c26afa feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-09-22 10:56:40 +08:00
73793848ce feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-04 00:47:02 +08:00
0510c3dda1 feat(打包环境): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-19 14:56:08 +08:00
4489e44c03 fix(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-07-08 00:52:48 +08:00
070c4c9fc8 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-12 13:51:56 +08:00
7774e19f99 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-06-02 13:56:10 +08:00
b07004642f feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-05-12 11:02:14 +08:00
4c8e5d06b6 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-04-15 11:38:24 +08:00
18c351fd6d feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-03-16 09:22:07 +08:00
2ccd60b65c feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-23 11:06:11 +08:00
d69946bf60 feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-22 10:49:47 +08:00
dea6d483a9 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-08 04:29:12 +08:00
e6ec4965da feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-20 14:39:56 +08:00
da8ca38c99 feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-15 10:28:55 +08:00
d3265d35a5 feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2021-12-06 00:00:27 +08:00
6f8569a01d feat(升级依赖): 升级依赖
All checks were successful
continuous-integration/drone/push Build is passing
2021-11-07 00:25:44 +08:00
4ddf0bd22a feat(更新版本): 更新版本
All checks were successful
continuous-integration/drone/push Build is passing
2021-10-09 10:04:33 +08:00
42b144528e chore(调整构建): 调整构建
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-22 09:58:43 +08:00
4383fc8c18 chore(自动构建): 调整构建脚本
Some checks reported errors
continuous-integration/drone/push Build was killed
2021-09-22 09:56:19 +08:00
e68a039e7d feat(升级版本): 升级版本
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-10 14:00:42 +08:00
b416798984 docs(更新文档): 更新文档
All checks were successful
continuous-integration/drone/push Build is passing
2021-09-08 11:29:53 +08:00
511e47ab75 feat(优化发布): 发布镜像使用腾讯云 2021-09-08 11:26:36 +08:00
8 changed files with 70 additions and 157 deletions

View File

@ -1,48 +1,37 @@
---
kind: pipeline
type: docker
name: goenv
name: default
node:
region: cn
steps:
- name: build
pull: if-not-exists
image: golang:alpine
image: debian
commands:
- chmod +x build.sh
- ./build.sh
- name: upload
image: xiaoqidun/gocos
settings:
secret_id:
from_secret: cos_secret_id
secret_key:
from_secret: cos_secret_key
bucket_url:
from_secret: cos_bucket_url
source: release/
target: product/goenv
strip_prefix: release/
---
kind: pipeline
type: docker
name: docker
steps:
- name: build
pull: if-not-exists
image: alpine
commands:
- wget -q -T 180 https://dl.google.com/android/repository/android-ndk-r23-linux.zip
- unzip -q android-ndk-r23-linux.zip
- rm -f android-ndk-r23-linux.zip
- name: docker
- sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources
- apt-get update && apt-get install -y wget unzip && rm -rf /var/lib/apt/lists/*
- wget -q -T 180 -4 https://dl.google.com/android/repository/android-ndk-r29-beta1-linux.zip
- unzip -q android-ndk-r29-beta1-linux.zip
- rm -f android-ndk-r29-beta1-linux.zip
- name: docker-cn
pull: if-not-exists
image: plugins/docker
settings:
repo: xiaoqidun/goenv
repo: ccr.ccs.tencentyun.com/xiaoqidun/goenv
registry: ccr.ccs.tencentyun.com
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: Dockerfile
dockerfile: DockerfileCN
- name: docker-hk
pull: if-not-exists
image: plugins/docker
settings:
repo: hkccr.ccs.tencentyun.com/xiaoqidun/goenv
registry: hkccr.ccs.tencentyun.com
username:
from_secret: docker_username
password:
from_secret: docker_password
dockerfile: DockerfileHK

View File

@ -1,19 +0,0 @@
# 基础镜像
FROM golang:1.17-bullseye
# 作者信息
LABEL MAINTAINER="xiaoqidun@gmail.com"
# 安装编译工具链
RUN apt-get update \
&& apt-get install -y \
build-essential mingw-w64 \
upx-ucl strace htop tmux file zip
# 安装android ndk
COPY android-ndk-r23 /usr/local/android-ndk-r23
# 环境变量
ENV PATH=$PATH:/usr/local/android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.aite.xyz,direct

22
DockerfileCN Normal file
View File

@ -0,0 +1,22 @@
# 基础镜像
FROM golang:1.24.2-bookworm
# 作者信息
LABEL authors="xiaoqidun"
# 使用中国软件源
RUN sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources
# 安装编译工具链
RUN apt-get update \
&& apt-get install -y \
build-essential mingw-w64 \
&& rm -rf /var/lib/apt/lists/*
# 安装android ndk
COPY android-ndk-r29-beta1 /usr/local/android-ndk-r29-beta1
# 环境变量
ENV PATH=$PATH:/usr/local/android-ndk-r29-beta1/toolchains/llvm/prebuilt/linux-x86_64/bin
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct

19
DockerfileHK Normal file
View File

@ -0,0 +1,19 @@
# 基础镜像
FROM golang:1.24.2-bookworm
# 作者信息
LABEL authors="xiaoqidun"
# 安装编译工具链
RUN apt-get update \
&& apt-get install -y \
build-essential mingw-w64 \
&& rm -rf /var/lib/apt/lists/*
# 安装android ndk
COPY android-ndk-r29-beta1 /usr/local/android-ndk-r29-beta1
# 环境变量
ENV PATH=$PATH:/usr/local/android-ndk-r29-beta1/toolchains/llvm/prebuilt/linux-x86_64/bin
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.aite.xyz,direct

View File

@ -5,12 +5,12 @@ golang environment
## 拉取镜像
```
docker pull xiaoqidun/goenv:latest
docker pull ccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
```
## 运行镜像
```
docker run -it --rm xiaoqidun/goenv
docker run -it --rm ccr.ccs.tencentyun.com/xiaoqidun/goenv
```
# 编译项目
@ -19,17 +19,17 @@ docker run -it --rm xiaoqidun/goenv
### linux - bash
```shell
docker run --rm -it -v $(pwd):/go/src/app -w /go/src/app xiaoqidun/goenv
docker run --rm -it -v $(pwd):/usr/src/app -w /usr/src/app ccr.ccs.tencentyun.com/xiaoqidun/goenv
```
### windows - cmd
```bat
docker run --rm -it -v %cd%:/go/src/app -w /go/src/app xiaoqidun/goenv
docker run --rm -it -v %cd%:/usr/src/app -w /usr/src/app ccr.ccs.tencentyun.com/xiaoqidun/goenv
```
### windows - powershell
```powershell
docker run --rm -it -v "${pwd}:/go/src/app" -w /go/src/app xiaoqidun/goenv
docker run --rm -it -v "${pwd}:/usr/src/app" -w /usr/src/app ccr.ccs.tencentyun.com/xiaoqidun/goenv
```
## 在容器内执行命令进行编译
@ -73,17 +73,3 @@ go build -o main_windows_amd64.exe main.go
## 动态编译
- 动态编译必须设置CC变量指定C编译器可执行文件路径或者在PATH变量内的可执行C编译器名称
# 快捷命令 - goenv
> 运行一个goenv容器并将当前目录挂载到容器的工作目录
## 快速安装
```shell
go install github.com/xiaoqidun/goenv@latest
```
## 手动安装
1. 根据系统架构下载为你编译好的[二进制文件](https://aite.xyz/product/goenv/)
2. 将下载好的二进制文件重命名为goenv并保留后缀
3. 把goenv文件移动到系统PATH环境变量中的目录下
4. windows外的系统需使用chmod命令赋予可执行权限

View File

@ -1,4 +0,0 @@
#!/bin/sh
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_linux_amd64 -trimpath -ldflags '-s -w' goenv.go
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_darwin_amd64 -trimpath -ldflags '-s -w' goenv.go
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o release/goenv_windows_amd64.exe -trimpath -ldflags '-s -w' goenv.go

3
go.mod
View File

@ -1,3 +0,0 @@
module github.com/xiaoqidun/goenv
go 1.15

View File

@ -1,77 +0,0 @@
package main
import (
"flag"
"fmt"
"os"
"os/exec"
"runtime"
)
var (
author bool
)
func init() {
flag.BoolVar(&author, "author", false, "关于本软件开发者")
flag.Parse()
}
func main() {
if author {
Author()
return
}
binary := "docker"
if runtime.GOOS == "linux" {
podman, err := exec.LookPath("podman")
if err == nil {
binary = podman
}
}
docker := &DockerGoEnv{
Image: "xiaoqidun/goenv",
Binary: binary,
WorkDir: "/go/src/app",
AutoDelete: true,
MountWorkDir: true,
}
docker.Run()
}
func Author() {
fmt.Println("welcome to our website https://aite.xyz/")
fmt.Println("----------------------------------------")
fmt.Println("腾讯扣扣88966001")
fmt.Println("电子邮箱xiaoqidun@gmail.com")
}
type DockerGoEnv struct {
Image string
Binary string
CmdArgs []string
WorkDir string
AutoDelete bool
MountWorkDir bool
}
func (d *DockerGoEnv) Run() {
d.CmdArgs = []string{"run", "-it"}
if d.AutoDelete {
d.CmdArgs = append(d.CmdArgs, "--rm")
}
if d.MountWorkDir {
if pwd, err1 := os.Getwd(); err1 == nil {
d.CmdArgs = append(d.CmdArgs, "-v", pwd+":"+d.WorkDir, "-w", d.WorkDir)
}
}
if hostname, err1 := os.Hostname(); err1 == nil {
d.CmdArgs = append(d.CmdArgs, "-h", hostname)
}
d.CmdArgs = append(d.CmdArgs, d.Image)
cmd := exec.Command(d.Binary, d.CmdArgs...)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
_ = cmd.Run()
}