Categorygithub.com/yhyj/wocker
modulepackage
0.0.1
Repository: https://github.com/yhyj/wocker.git
Documentation: pkg.go.dev

# README

Wocker


Go build and release by GoReleaser


Table of Contents



一个 Docker 包装器

Install

一键安装

curl -fsSL https://raw.githubusercontent.com/YHYJ/wocker/main/install.sh | sudo bash -s

Usage

  • image子命令

    管理 docker 镜像,可以指定镜像或交互式操作

  • volume子命令

    管理 docker 卷,可以指定卷或交互式操作

  • version子命令

    查看程序版本信息

  • help子命令

    查看程序帮助信息

Compile

当前平台

go build -gcflags="-trimpath" -ldflags="-s -w -X github.com/yhyj/wocker/general.GitCommitHash=`git rev-parse HEAD` -X github.com/yhyj/wocker/general.BuildTime=`date +%s` -X github.com/yhyj/wocker/general.BuildBy=$USER" -o build/wocker main.go

交叉编译

使用命令go tool dist list查看支持的平台

Linux

CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -gcflags="-trimpath" -ldflags="-s -w -X github.com/yhyj/wocker/general.GitCommitHash=`git rev-parse HEAD` -X github.com/yhyj/wocker/general.BuildTime=`date +%s` -X github.com/yhyj/wocker/general.BuildBy=$USER" -o build/wocker main.go

使用uname -m确定硬件架构

  • 结果是 x86_64 则 GOARCH=amd64
  • 结果是 aarch64 则 GOARCH=arm64

# Packages

No description provided by the author
No description provided by the author
No description provided by the author