├── Dockerfile ├── README.md ├── .github └── workflows │ ├── docker-build.yml │ ├── image.yml │ └── release.yaml └── LICENSE /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_OS="alpine" 2 | ARG BASE_OS_VERSION="3.22" 3 | 4 | FROM ${BASE_OS}:${BASE_OS_VERSION} 5 | 6 | ARG CATT_VERSION=0.13.0 7 | ENV CATT_VERSION=${CATT_VERSION} 8 | 9 | LABEL maintainer="datmanslo@yahoo.com" \ 10 | version="${CATT_VERSION}" \ 11 | repo="github.com/datmanslo/docker-catt" 12 | 13 | RUN apk add --no-cache python3 py3-pip && \ 14 | pip3 install --no-cache-dir --break-system-packages catt==${CATT_VERSION} && \ 15 | find /usr/lib/python3* -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true && \ 16 | rm -rf /root/.cache 17 | 18 | ENTRYPOINT ["catt"] 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Docker Build and Test](https://github.com/datmanslo/docker-catt/actions/workflows/docker-build.yml/badge.svg)](https://github.com/datmanslo/docker-catt/actions/workflows/docker-build.yml) 2 | # docker-catt 3 | "Dockerized" version of https://github.com/skorokithakis/catt: Cast All The Things 4 | ## Usage: 5 | `docker run --rm --network=host datmanslo/catt ` 6 | e.g `docker run --rm --network=host datmanslo/catt --help` 7 | Please note the inclusion of `--network=host` flag which will allow broadcasts to work over the docker host network for functions such as discovery. 8 | 9 | # CREDIT: 10 | ## All credit to https://github.com/skorokithakis/catt. Please head over to the creator's repo to learn more. This is simply a Docker container running the CATT tool with no modifications. 11 | -------------------------------------------------------------------------------- /.github/workflows/docker-build.yml: -------------------------------------------------------------------------------- 1 | name: Docker Build and Test 2 | 3 | on: 4 | push: 5 | branches: [ main, master ] 6 | pull_request: 7 | branches: [ main, master ] 8 | workflow_dispatch: 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Checkout code 16 | uses: actions/checkout@v4 17 | 18 | - name: Set up Docker Buildx 19 | uses: docker/setup-buildx-action@v3 20 | 21 | - name: Build Docker image 22 | uses: docker/build-push-action@v5 23 | with: 24 | context: . 25 | push: false 26 | tags: datmanslo/catt:latest 27 | load: true 28 | 29 | - name: Test Docker image 30 | run: | 31 | docker run --rm --name catt datmanslo/catt:latest --version | grep -c "catt v0.13.0, Zaniest Zapper." || exit 1 32 | 33 | -------------------------------------------------------------------------------- /.github/workflows/image.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: main 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | 10 | - name: checkout code 11 | uses: actions/checkout@v2 12 | - 13 | name: Set up QEMU 14 | uses: docker/setup-qemu-action@v1 15 | with: 16 | platforms: all 17 | - 18 | name: Set up Docker Buildx 19 | id: buildx 20 | uses: docker/setup-buildx-action@v1 21 | with: 22 | version: latest 23 | install: true 24 | - 25 | name: Available platforms 26 | run: echo ${{ steps.buildx.outputs.platforms }} 27 | 28 | - name: login to docker hub 29 | run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin 30 | 31 | - name: build the image 32 | run: | 33 | docker build \ 34 | --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \ 35 | --output "type=image,push=true" \ 36 | --tag datmanslo/catt:latest \ 37 | - < ./Dockerfile 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2019, datmanslo 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | # Sequence of patterns matched against refs/tags 4 | tags: 5 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 6 | 7 | name: Create Release and Push Tag to Dockerhub 8 | 9 | jobs: 10 | build: 11 | name: Create Release 12 | runs-on: ubuntu-latest 13 | steps: 14 | - 15 | name: Checkout code 16 | uses: actions/checkout@v2 17 | - 18 | name: Set env 19 | run: | 20 | echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV 21 | COMMIT_MSG=$(git log -1 --pretty=%B) 22 | echo "COMMIT_MESSAGE<> $GITHUB_ENV 23 | echo "$COMMIT_MSG" >> $GITHUB_ENV 24 | echo "EOF" >> $GITHUB_ENV 25 | - 26 | name: Set up QEMU 27 | uses: docker/setup-qemu-action@v1 28 | with: 29 | platforms: all 30 | - 31 | name: Set up Docker Buildx 32 | id: buildx 33 | uses: docker/setup-buildx-action@v1 34 | with: 35 | version: latest 36 | install: true 37 | - 38 | name: Available platforms 39 | run: echo ${{ steps.buildx.outputs.platforms }} 40 | 41 | - name: login to docker hub 42 | run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin 43 | 44 | - name: build the image 45 | run: | 46 | docker build \ 47 | --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x \ 48 | --output "type=image,push=true" \ 49 | --tag datmanslo/catt:$RELEASE_VERSION \ 50 | - < ./Dockerfile 51 | - 52 | name: Create Release 53 | id: create_release 54 | uses: actions/create-release@v1 55 | env: 56 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 57 | with: 58 | 59 | tag_name: ${{ github.ref }} 60 | release_name: Release ${{ github.ref }} 61 | body: ${{ env.COMMIT_MESSAGE }} 62 | draft: false 63 | prerelease: false 64 | --------------------------------------------------------------------------------