Skip to content

Commit e23c7bb

Browse files
committed
Remove ARM64 support - build amd64 only with Rosetta 2 support for Mac
- Remove linux/arm64 from build platforms - Update README from multi-architecture to amd64-only - Add comprehensive Mac/Rosetta 2 setup instructions - Update CI/CD documentation - Reason: Simplify builds and align with dispatcher-sdk constraints
1 parent aa86513 commit e23c7bb

2 files changed

Lines changed: 149 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- '*'
7+
tags:
8+
- '*'
79

810
jobs:
911
build:
@@ -54,27 +56,56 @@ jobs:
5456
run: |
5557
cd test && bash ./run_tests.sh "ghcr.io/$GITHUB_REPOSITORY_OWNER/$IMAGE:$GIT_BRANCH"
5658
59+
- name: Run docker image analysis
60+
continue-on-error: true
61+
uses: MaxymVlasov/dive-action@v1.4.0
62+
with:
63+
image: ${{ steps.docker_build.outputs.imageid }}
64+
config-file: ${{ github.workspace }}/.dive-ci.yml
65+
github-token: ${{ secrets.GITHUB_TOKEN }}
66+
67+
- name: Generate tags
68+
id: tags
69+
run: |
70+
# Check if this is a tag push
71+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
72+
# Extract tag name (e.g., refs/tags/2.0.187 -> 2.0.187)
73+
VERSION_TAG="${{ github.ref_name }}"
74+
TAGS="${IMAGE}:${VERSION_TAG}"
75+
TAGS="${TAGS},ghcr.io/${GITHUB_REPOSITORY_OWNER}/${IMAGE}:${VERSION_TAG}"
76+
echo "Building from git tag: ${VERSION_TAG}"
77+
else
78+
# Branch push - use branch name
79+
TAGS="${IMAGE}:${GIT_BRANCH}"
80+
TAGS="${TAGS},ghcr.io/${GITHUB_REPOSITORY_OWNER}/${IMAGE}:${GIT_BRANCH}"
81+
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
82+
TAGS="${TAGS},${IMAGE}:latest"
83+
TAGS="${TAGS},ghcr.io/${GITHUB_REPOSITORY_OWNER}/${IMAGE}:latest"
84+
fi
85+
echo "Building from branch: ${GIT_BRANCH}"
86+
fi
87+
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
88+
echo "Generated tags: ${TAGS}"
89+
5790
- name: Build and push
5891
uses: docker/build-push-action@v2
5992
with:
6093
context: .
6194
platforms: linux/amd64
6295
push: true
63-
tags: |
64-
${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
65-
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ env.GIT_BRANCH }}
96+
tags: ${{ steps.tags.outputs.tags }}
6697

6798
- name: Update Docker Hub Description
6899
uses: peter-evans/dockerhub-description@v2
69100
continue-on-error: true
70101
with:
71102
username: ${{ secrets.DOCKER_USERNAME }}
72103
password: ${{ secrets.DOCKER_PASSWORD }}
73-
repository: peterevans/dockerhub-description
104+
repository: aemdesign/aem-base
74105
- uses: meeDamian/github-release@1.0
75-
if: github.ref == 'refs/heads/master'
106+
if: startsWith(github.ref, 'refs/tags/')
76107
with:
77108
token: ${{ secrets.GITHUB_TOKEN }}
78-
tag: ${{ env.GITHUB_TAG }}
79-
name: ${{ env.GITHUB_TAG }}
109+
tag: ${{ github.ref_name }}
110+
name: ${{ github.ref_name }}
80111
body: ${{ env.GIT_RELEASE_NOTES }}

README.md

Lines changed: 111 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Debian with AEM
1+
## AEM Base
22

33
[![build](https://github.com/aem-design/docker-aem-base/actions/workflows/build.yml/badge.svg?branch=jdk17)](https://github.com/aem-design/docker-aem-base/actions/workflows/build.yml)
44
[![github license](https://img.shields.io/github/license/aem-design/aem-base)](https://github.com/aem-design/aem-base)
@@ -9,11 +9,118 @@
99
[![docker pulls](https://img.shields.io/docker/pulls/aemdesign/aem-base)](https://hub.docker.com/r/aemdesign/aem-base)
1010
[![github release](https://img.shields.io/github/release/aem-design/aem-base)](https://github.com/aem-design/aem-base)
1111

12-
This is docker image based on [aemdesign/java-ffmpeg](https://hub.docker.com/r/aemdesign/java-ffmpeg/) with AEM base libs
12+
Docker image based on [aemdesign/java-ffmpeg](https://hub.docker.com/r/aemdesign/java-ffmpeg/) with AEM base libraries for Forms processing.
13+
14+
Docker image for linux/amd64 (also runs on Apple Silicon via Rosetta 2).
15+
16+
## Docker Images
17+
18+
Images are available on both registries:
19+
- **Docker Hub**: `aemdesign/aem-base`
20+
- **GitHub Container Registry**: `ghcr.io/aem-design/aem-base`
21+
22+
### Tags
23+
24+
- `latest` - Latest build from main branch
25+
- `jdk17` - JDK 17 branch
26+
- Version tags (pushed when git tags are created)
1327

1428
### Included Packages
1529

16-
Following is the list of packages included
30+
* **AEM Forms libraries** - Required libraries for AEM Forms processing
31+
* **Java runtime** - Inherited from java-ffmpeg base image
32+
* **FFMPEG** - Inherited from java-ffmpeg base image
33+
34+
## Development
35+
36+
### CI/CD Pipeline
37+
38+
The project uses GitHub Actions for continuous integration and deployment:
39+
40+
- **Platform**: Images are built for `linux/amd64`
41+
- **Apple Silicon support**: Works seamlessly on M1/M2/M3/M4 Macs via Docker Desktop's Rosetta 2 emulation
42+
- **Automated testing**: Java and FFMPEG versions are verified before pushing
43+
- **Image analysis**: Uses `dive` for Docker image layer analysis
44+
- **Dual registry push**: Automatically pushes to Docker Hub and GitHub Container Registry
45+
- **Git tag versioning**: Pushing a git tag automatically creates a corresponding Docker image tag
46+
47+
### Running on Apple Silicon Macs (M1/M2/M3/M4)
48+
49+
This image is built for `linux/amd64` architecture but runs seamlessly on Apple Silicon Macs through **Rosetta 2** emulation in Docker Desktop.
50+
51+
#### Prerequisites
52+
53+
1. **Docker Desktop for Mac** (version 4.25.0 or later recommended)
54+
- Download from: https://www.docker.com/products/docker-desktop
55+
56+
2. **Rosetta 2** (usually already installed on modern macOS)
57+
- To verify/install: `softwareupdate --install-rosetta`
58+
59+
#### Enable Rosetta 2 in Docker Desktop
60+
61+
1. Open **Docker Desktop**
62+
2. Go to **Settings** (⚙️ icon) → **General**
63+
3. Enable **"Use Rosetta for x86_64/amd64 emulation on Apple Silicon"**
64+
4. Click **Apply & Restart**
65+
66+
![Docker Desktop Rosetta Setting](https://docs.docker.com/desktop/images/rosetta.png)
67+
68+
#### Verify It's Working
69+
70+
```bash
71+
# Pull and run the image
72+
docker pull aemdesign/aem-base:latest
73+
docker run --rm aemdesign/aem-base:latest uname -m
74+
75+
# Expected output: x86_64 (running via Rosetta 2)
76+
```
77+
78+
#### Performance Notes
79+
80+
- **Rosetta 2 emulation** provides near-native performance for most workloads
81+
- First container start may be slightly slower (Rosetta translation cache warmup)
82+
- Subsequent starts are fast
83+
- **No code changes needed** - everything works transparently
84+
85+
### Monitoring Pipeline Status
86+
87+
Use the `get-action-logs.ps1` PowerShell script to monitor GitHub Actions workflow status and logs.
88+
89+
#### Prerequisites
90+
91+
- GitHub CLI (`gh`) must be installed and authenticated
92+
- Install: `winget install --id GitHub.cli`
93+
- Authenticate: `gh auth login`
94+
95+
#### Quick Start
96+
97+
```powershell
98+
# Check current commit's pipeline status (saves logs to logs/ folder by default)
99+
.\get-action-logs.ps1
100+
101+
# Wait for pipeline to complete
102+
.\get-action-logs.ps1 -WaitForCompletion
103+
104+
# Show logs in console
105+
.\get-action-logs.ps1 -ShowLogs
106+
107+
# Force re-download logs
108+
.\get-action-logs.ps1 -Force
109+
```
110+
111+
See full documentation: `Get-Help .\get-action-logs.ps1 -Full`
112+
113+
### Creating a New Release
114+
115+
```bash
116+
# Tag the commit
117+
git tag 1.0.0
118+
git push origin 1.0.0
119+
```
120+
121+
This will automatically build and push versioned Docker images to both registries.
122+
123+
## License
17124

18-
* aem libs - for aem forms processing
125+
See [LICENSE](LICENSE) file for details.
19126

0 commit comments

Comments
 (0)