Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- "go.mod"
- "go.sum"
- ".goreleaser.yaml"
- "Dockerfile.goreleaser"
- "VERSION"

permissions:
Expand Down Expand Up @@ -65,7 +66,13 @@ jobs:
with:
go-version-file: go.mod

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- uses: goreleaser/goreleaser-action@v7
with:
version: latest
args: build --snapshot --clean
args: release --snapshot --clean --skip publish
12 changes: 12 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ jobs:
with:
go-version-file: go.mod

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: goreleaser/goreleaser-action@v7
with:
version: latest
Expand Down
11 changes: 11 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ changelog:
- '^test:'
- '^chore:'

dockers_v2:
- images:
- "cataybe/tlsctl"
tags:
- "v{{ .Version }}"
- "latest"
platforms:
- linux/amd64
- linux/arm64
dockerfile: Dockerfile.goreleaser

release:
github:
owner: catay
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM alpine:3.23

ARG TARGETPLATFORM

RUN set -eux; addgroup -g 6666 tlsctl && adduser -u 6666 -G tlsctl -D -H tlsctl

COPY ${TARGETPLATFORM}/tlsctl /usr/bin/tlsctl

USER tlsctl:tlsctl

ENTRYPOINT ["/usr/bin/tlsctl"]
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,24 @@ make build # or: go build -o tlsctl .

### Docker

Pre-built images are published to Docker Hub on every release:

```bash
# Build the image
docker build -t tlsctl .
# Pull and run the latest release
docker run --rm catay/tlsctl client github.com

# Run
docker run --rm tlsctl client github.com
# Use a specific version
docker run --rm catay/tlsctl:v1.1.0 client github.com

# Inspect a local PEM file (mount it into the container)
docker run --rm -v /path/to/cert.pem:/cert.pem:ro tlsctl pem /cert.pem
docker run --rm -v /path/to/cert.pem:/cert.pem:ro catay/tlsctl pem /cert.pem
```

You can also build the image locally:

```bash
docker build -t tlsctl .
docker run --rm tlsctl client github.com
```

## Quick start
Expand Down
Loading