11# Go + JasperStarter Docker Image
22
3- A lightweight Docker base image combining Go 1.23 Alpine with JasperStarter for report generation.
3+ A lightweight Docker base image combining Go 1.25 Alpine with JasperStarter for report generation.
44
55## What's Included
66
7- - ** Go 1.23 ** - Go programming language
7+ - ** Go 1.25 ** - Go programming language
88- ** OpenJDK 17** - Java runtime for JasperStarter
99- ** JasperStarter 3.6.2** - Tool to run JasperReports reports
1010- ** Font Support** - Common fonts (FreeFont, Liberation, DejaVu) for PDF generation
1111- ** Alpine Linux** - Small and secure base distribution
1212
1313## Image Tags
1414
15- - ` golang-jasper:1.23-3.6.2 ` - Version specific tag
16- - ` golang-jasper:latest ` - Latest version
15+ Available on GitHub Container Registry:
16+
17+ - ` ghcr.io/unlockedlabs/golang-jasper:1.25-3.6.2 ` - Version specific tag
18+ - ` ghcr.io/unlockedlabs/golang-jasper:latest ` - Latest version
1719
1820## Usage
1921
@@ -22,7 +24,7 @@ A lightweight Docker base image combining Go 1.23 Alpine with JasperStarter for
2224Use this image as a base for your Go applications that need JasperStarter:
2325
2426``` dockerfile
25- FROM golang-jasper:1.23 -3.6.2
27+ FROM ghcr.io/unlockedlabs/ golang-jasper:1.25 -3.6.2
2628
2729# install your Go development tools
2830RUN go install github.com/air-verse/
[email protected] @@ -39,6 +41,16 @@ EXPOSE 8080
3941CMD ["air" ]
4042```
4143
44+ ### Pulling the Image
45+
46+ ``` bash
47+ # Pull the latest version
48+ docker pull ghcr.io/unlockedlabs/golang-jasper:latest
49+
50+ # Pull a specific version
51+ docker pull ghcr.io/unlockedlabs/golang-jasper:1.25-3.6.2
52+ ```
53+
4254### Running JasperStarter
4355
4456The image includes JasperStarter in the PATH, so you can use it directly:
@@ -54,37 +66,53 @@ exec.Command("jasperstarter", "process", "report.jrxml", "-f", "pdf")
5466## Building the Image
5567
5668``` bash
57- # clone or copy this directory
58- cd ~ /wkspcs/golang-jasper
69+ # clone this repository
70+ git clone https://github.com/unlockedlabs/golang-jasperstarter-docker.git
71+ cd golang-jasperstarter-docker
5972
6073# build using the script
6174./build.sh
6275
6376# or build manually
64- docker build -t golang-jasper:1.23 -3.6.2 .
65- docker tag golang-jasper:1.23 -3.6.2 golang-jasper:latest
77+ docker build -t ghcr.io/unlockedlabs/ golang-jasper:1.25 -3.6.2 .
78+ docker tag ghcr.io/unlockedlabs/ golang-jasper:1.25 -3.6.2 ghcr.io/unlockedlabs/ golang-jasper:latest
6679```
6780
6881## Pushing to Registry
6982
70- Edit the ` REGISTRY ` variable in ` build.sh ` or specify it when building:
83+ The image is automatically built and pushed to GitHub Container Registry via GitHub Actions on every push to ` main ` and on version tags.
84+
85+ ### Manual Push
86+
87+ Set your GitHub token and run the build script:
7188
7289``` bash
73- # for Docker Hub
74- REGISTRY=" yourusername/"
90+ export GITHUB_TOKEN=ghp_your_token_here
7591./build.sh
92+ ```
7693
77- # for private registry
78- REGISTRY=" your-registry.com/yournamespace/"
79- ./build.sh
94+ The script will prompt you to push after building.
95+
96+ ### Automated Push (GitHub Actions)
97+
98+ Push to the ` main ` branch or create a version tag:
99+
100+ ``` bash
101+ # Trigger build on push to main
102+ git push origin main
103+
104+ # Or create and push a version tag
105+ git tag v1.25-3.6.2
106+ git push origin v1.25-3.6.2
80107```
81108
82109## Verification
83110
84111Test the installation:
85112
86113``` bash
87- docker run --rm golang-jasper:1.23-3.6.2 jasperstarter --version
114+ docker run --rm ghcr.io/unlockedlabs/golang-jasper:1.25-3.6.2 go version
115+ docker run --rm ghcr.io/unlockedlabs/golang-jasper:1.25-3.6.2 jasperstarter --version
88116```
89117
90118## Size Optimization
@@ -104,3 +132,18 @@ The image includes common fonts for PDF generation:
104132- DejaVu family
105133
106134Font cache is updated during image build for optimal performance.
135+
136+ ## License
137+
138+ This Dockerfile is released under the MIT License. See [ LICENSE] ( LICENSE ) for details.
139+
140+ The image includes third-party software with their respective licenses:
141+
142+ - Go: BSD-3-Clause License
143+ - JasperStarter: Apache-2.0 License
144+
145+ See [ NOTICES] ( NOTICES ) for complete third-party license information.
146+
147+ ## Contributing
148+
149+ Contributions are welcome! Please feel free to submit a Pull Request.
0 commit comments