Sign inSign up

mediatriple/cdnctl

By mediatriple

•Updated 8 days ago

Official CLI for cdn.com.tr — purge CDN cache and manage container apps from CI

Image
1

1.4K

mediatriple/cdnctl repository overview

⁠cdnctl

Official command-line interface for cdn.com.tr⁠ — purge CDN cache, deploy and manage container apps, and move files, from a shell or a CI job.

This image exists so a pipeline can run cdnctl without installing anything.

docker run --rm -e CDNCTL_TOKEN -e CDN_ACCOUNT \
  mediatriple/cdnctl purge --type prefix --path /assets/

cdnctl is MIT-licensed and developed in the open at github.com/mediatriple/cdnctl⁠.

⁠Tags

  • latest — the current release
  • 0.17.2, 0.17.1, … — pinned versions. Pin the version in CI. latest moves.

The image reports the same version string as every other channel:

docker run --rm mediatriple/cdnctl --version
# cdnctl 0.17.2

⁠What you can do with it

  • Cache purge — by exact URL, by prefix, or every variant of an object
  • Container apps — deploy, scale, restart, read logs and status
  • Object storage — buckets, access keys, uploads
  • Files — push content to a push-CDN account
  • Accounts and hostnames — inspect what an account is serving and how

Run --help for the full command list:

docker run --rm mediatriple/cdnctl --help

⁠Authenticating in CI

cdnctl stores a saved login under $HOME, which is not what you want in a throwaway CI container. Pass the token and the target account through the environment instead and keep the container stateless:

VariableWhat it does
CDNCTL_TOKEN (or CDN_ACCESS_TOKEN)API token — replaces cdnctl login
CDN_ACCOUNTWhich CDN account to act on, so you don't rely on a saved selection
CDN_ENDPOINT (or CDNCTL_ENDPOINT)Override the API endpoint; rarely needed
# GitHub Actions
- name: Purge the CDN after deploy
  run: |
    docker run --rm \
      -e CDNCTL_TOKEN="${{ secrets.CDNCTL_TOKEN }}" \
      -e CDN_ACCOUNT="${{ vars.CDN_ACCOUNT }}" \
      mediatriple/cdnctl:0.17.2 \
      purge --type prefix --path /

If you would rather persist a login between runs, mount a volume at /home/cdnctl — that is the image's HOME, and it is writable.

⁠Notes

  • Built CGO_ENABLED=0 from a single Go binary; the runtime layer is Alpine plus a CA bundle, because every call is HTTPS to api.cdn.com.tr.
  • Runs as a non-root user (cdnctl).
  • linux/amd64.

⁠Other ways to install

Homebrew, apt, dnf and a plain tarball are all kept in lockstep with this image on every release — see the cdnctl documentation⁠.

⁠About

cdn.com.tr⁠ is a CDN and managed application platform operated from Istanbul, serving traffic since 2013 across 14 points of presence: pull and push CDN delivery, WAF and DDoS filtering, managed DNS, S3-compatible object storage, and managed container apps built from a Git repository or a docker-compose file.

Tag summary

Content type

Image

Digest

sha256:adbc92d52…

Size

6.4 MB

Last updated

8 days ago

docker pull mediatriple/cdnctl