diff --git a/.github/workflows/build_cups_docker.yml b/.github/workflows/build_cups_docker.yml index 314b631..6ec4424 100644 --- a/.github/workflows/build_cups_docker.yml +++ b/.github/workflows/build_cups_docker.yml @@ -3,6 +3,7 @@ run-name: Building CUPS docker image and pushing it to GitHub registry on: push: branches: + - canary - master paths: - "cups/**" @@ -19,6 +20,14 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set image tag variable + id: vars + run: | + if [[ ${{ github.ref_name }} == "master" ]]; then + echo "TAG=latest" >> $GITHUB_OUTPUT + else + echo "TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT + fi - name: Set up Docker Buildx # Needed by docker/build-push-action@v6 uses: docker/setup-buildx-action@v3 - name: Build and push @@ -27,4 +36,4 @@ jobs: context: ./cups file: ./cups/Dockerfile push: true - tags: ghcr.io/sellpy/cups:latest + tags: ghcr.io/sellpy/cups:${{ steps.vars.outputs.TAG }} diff --git a/cups/Dockerfile b/cups/Dockerfile index 421cd51..8a2f228 100644 --- a/cups/Dockerfile +++ b/cups/Dockerfile @@ -1,30 +1,28 @@ -# lock version to 16.04 in order to not get a cups version that doesn't delete job data files. -FROM ubuntu:16.04 - -RUN apt-get clean && apt-get update && apt-get install -y locales - -# enable utf-8 locale -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 -ENV LANG en_US.UTF-8 - -ENV TERM xterm - -ADD install.sh /tmp/install.sh -RUN sh -e /tmp/install.sh - -ENV TINI_VERSION v0.9.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +rx /tini - -# install intermec drivers +FROM ubuntu:24.04 + +RUN apt-get update && apt-get install -y \ + cups \ + automake \ + autoconf \ + gcc \ + ghostscript \ + poppler-utils \ + netpbm \ + build-essential \ + && apt-get clean + +# Enable utf-8 locale +ENV LANG=C.UTF-8 +ENV LC_ALL=C.UTF-8 + +# Used by driver build script +ENV TERM=xterm + +# Install intermec drivers ADD drivers ./drivers RUN cd ./drivers && tar -zxvf cupsdriver-1.2-56.tar.gz && cd cupsdriver-1.2-56 && ./build.sh # Copy local configuration file to container COPY cupsd.conf /etc/cups/ -ENTRYPOINT ["/tini", "--"] CMD ["/usr/sbin/cupsd", "-f"] diff --git a/cups/drivers/cupsdriver-1.2-56.tar.gz b/cups/drivers/cupsdriver-1.2-56.tar.gz index 62f0f65..0d77a36 100644 Binary files a/cups/drivers/cupsdriver-1.2-56.tar.gz and b/cups/drivers/cupsdriver-1.2-56.tar.gz differ diff --git a/cups/install.sh b/cups/install.sh deleted file mode 100644 index f7029b7..0000000 --- a/cups/install.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -e - -export DEBIAN_FRONTEND=noninteractive - -apt-get update -apt-get upgrade -y -apt-get install -y \ - cups \ - automake \ - autoconf \ - gcc \ - ghostscript \ - poppler-utils \ - netpbm \ - build-essential \ - sudo -apt-get clean \ No newline at end of file