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
13 changes: 9 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
push:
branches:
- main
pull_request: # Build only, no push
branches:
- main
workflow_dispatch: # Allow manual triggering

env:
Expand All @@ -18,16 +21,17 @@ jobs:
strategy:
matrix:
include:
- image_name: aspnet-noble-ghostscript
- image_name: aspnet-ghostscript
dockerfile_path: .
- image_name: aspnet-noble-ghostscript-xps
- image_name: aspnet-ghostscript-xps
dockerfile_path: ./XPS

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to Azure Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ secrets.ACR_LOGIN_SERVER }}
Expand All @@ -38,4 +42,5 @@ jobs:
run: docker build -t ${{ secrets.ACR_LOGIN_SERVER }}/${{ matrix.image_name }}:latest ${{ matrix.dockerfile_path }}

- name: Push Docker image
if: github.event_name != 'pull_request'
run: docker push ${{ secrets.ACR_LOGIN_SERVER }}/${{ matrix.image_name }}:latest
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble
FROM mcr.microsoft.com/dotnet/aspnet:11.0-resolute
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends ghostscript zbar-tools \
Expand Down
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# ASP.NET Noble Ghostscript Docker Images
# ASP.NET Ghostscript Docker Images

This repository contains Docker images based on ASP.NET 10.0 Noble with Ghostscript tools installed.
This repository contains Docker images based on ASP.NET 11.0 on Ubuntu 26.04 (Resolute) with Ghostscript tools installed.

> **Note:** The images were previously published as `aspnet-noble-ghostscript` and `aspnet-noble-ghostscript-xps` (ASP.NET 10.0 on Ubuntu 24.04 Noble). Those images are no longer rebuilt; .NET 11 is not published on Noble, so switch to the `aspnet-ghostscript` / `aspnet-ghostscript-xps` images when moving to .NET 11.

## Docker Images

The repository provides two Docker images:

### aspnet-noble-ghostscript (Root)
- Base: `mcr.microsoft.com/dotnet/aspnet:10.0-noble`
### aspnet-ghostscript (Root)
- Base: `mcr.microsoft.com/dotnet/aspnet:11.0-resolute`
- Ghostscript for PDF processing
- zbar-tools for barcode/QR code processing
- Pre-configured GhostScript settings

### aspnet-noble-ghostscript-xps (XPS)
- Base: `mcr.microsoft.com/dotnet/aspnet:10.0-noble`
### aspnet-ghostscript-xps (XPS)
- Base: `mcr.microsoft.com/dotnet/aspnet:11.0-resolute`
- Ghostscript 10.08.0
- gpcl6 for PCL processing
- gxps for XPS processing
Expand All @@ -26,6 +28,7 @@ The repository provides two Docker images:
The repository includes a GitHub Actions workflow that:
- Runs nightly at 2 AM UTC
- Triggers on pushes to the main branch
- Builds (without pushing) on pull requests targeting the main branch
- Builds both Docker images in parallel using matrix strategy
- Pushes to Azure Container Registry
- Supports manual triggering via `workflow_dispatch`
Expand Down Expand Up @@ -54,6 +57,7 @@ To use the GitHub Actions workflow, you need to configure the following secrets

- **Scheduled builds**: Runs automatically every night at 2 AM UTC
- **Push triggers**: Runs on every push to the main branch
- **Pull request validation**: Builds both images on pull requests without logging in or pushing
- **Matrix strategy**: Builds both images in parallel for faster execution
- **Manual triggers**: Can be triggered manually from the Actions tab
- **Simple tagging**: Uses only the `latest` tag for all builds
Expand All @@ -62,30 +66,30 @@ To use the GitHub Actions workflow, you need to configure the following secrets
### Image Tags

The workflow creates a single tag for each image:
- `aspnet-noble-ghostscript:latest` - Standard Ghostscript image
- `aspnet-noble-ghostscript-xps:latest` - Full GhostPDL suite image
- `aspnet-ghostscript:latest` - Standard Ghostscript image
- `aspnet-ghostscript-xps:latest` - Full GhostPDL suite image

## Usage

Once the images are built and pushed to your Azure Container Registry, you can pull them using:

```bash
# Standard Ghostscript image
docker pull <your-registry>.azurecr.io/aspnet-noble-ghostscript:latest
docker pull <your-registry>.azurecr.io/aspnet-ghostscript:latest

# Full GhostPDL suite image (includes XPS and PCL support)
docker pull <your-registry>.azurecr.io/aspnet-noble-ghostscript-xps:latest
docker pull <your-registry>.azurecr.io/aspnet-ghostscript-xps:latest
```

## Environment Variables

The standard image (`aspnet-noble-ghostscript`) includes pre-configured environment variables for GhostScript:
The standard image (`aspnet-ghostscript`) includes pre-configured environment variables for GhostScript:

- `GhostScriptSettings__Executable="/usr/bin/gs"`
- `GhostScriptSettings__Parameter="-sDEVICE=pdfwrite -o \"{1}\" -dCompatibilityLevel=\"1.4\" -dPDFSETTINGS=\"/screen\" -dNOPAUSE -dQUIET -dBATCH \"{0}\""`
- `GhostScriptSettings__WorkDir="/tmp"`

The XPS image (`aspnet-noble-ghostscript-xps`) includes the full GhostPDL suite with:
The XPS image (`aspnet-ghostscript-xps`) includes the full GhostPDL suite with:
- Ghostscript 10.08.0 at `/usr/local/bin/gs`
- gpcl6 for PCL processing at `/usr/local/bin/gpcl6`
- gxps for XPS processing at `/usr/local/bin/gxps`
4 changes: 2 additions & 2 deletions XPS/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS ghostpdl
FROM mcr.microsoft.com/dotnet/aspnet:11.0-resolute AS ghostpdl

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN wget -q -O ghostpdl.tar.xz https://github.com/ArtifexSoftware/ghostpdl-downl
&& make install \
&& ln -s gs /usr/local/bin/ghostscript

FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble
FROM mcr.microsoft.com/dotnet/aspnet:11.0-resolute

RUN apt-get update \
&& apt-get upgrade -y \
Expand Down
Loading