Command line tool for Azure
| cmd | Push first | |
| .gitignore | Initial commit | |
| go.mod | Push first | |
| go.sum | Push first | |
| README.md | Push first | |
please
Hobby project to make a command line tool for Azure with commands I often use.
mkdir -p please/cmd
touch cmd/main.go
# go mod init codeberg.org/jacqueline/please
go get -d ./...
go get -u ./...
Run like so
/main -s <subscription-id> -g toys-rg,rg-petclinic-f8ba5,fud01-kube-rg -c delete
Example Dockerfile
# Build stageFROMgolang:1.20ASbuilderWORKDIR/app# Copy the source codeCOPY . .# Build the Go binaryRUN CGO_ENABLED=0 GOOS=linux go build -o myapp .# Final stageFROMalpine:latestWORKDIR/app# Copy the binary from the build stageCOPY --from=builder /app/myapp .# Run the binaryCMD ["./myapp"]