Skip to content

Commit 28316d5

Browse files
authored
Merge pull request #2 from Evodim/features/add-arg-for-arm-build
PR - Features/add arg for arm build
2 parents 7b708c5 + f034aec commit 28316d5

File tree

3 files changed

+45
-14
lines changed

3 files changed

+45
-14
lines changed

README.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,42 @@ volumes:
176176
- Uncomment the volume mount `./app:/srv/app/src` to edit code locally
177177
- Change `NODE_ENV=development`
178178

179+
## Image customization
180+
181+
### Build Arguments
182+
183+
You can customize the Docker image build process using build arguments (`--build-arg`). This allows you to control the base image and environment configuration.
184+
185+
#### Available Build Arguments
186+
187+
| Argument | Default Value | Description |
188+
|----------|---------------|-------------|
189+
| `BASE_IMAGE` | `node` | Base Docker image (e.g., `node`, `arm64v8/node` for ARM architecture) |
190+
| `NODE_VERSION` | `22-alpine` | Node.js version and variant for the base image |
191+
| `NODE_ENV` | `production` | Node.js environment mode (production/development) |
192+
193+
#### Examples
194+
195+
**Build for ARM64 architecture with custom Node version:**
196+
197+
```bash
198+
# Custom ARM64 build (as shown in your last build)
199+
docker build . \
200+
--build-arg BASE_IMAGE=arm64v8/node \
201+
-t evodim/strapi-azure:v2.5.30-arm
202+
```
203+
204+
**Build for standard AMD64 architecture:**
205+
206+
```bash
207+
# Standard x86_64/AMD64 build
208+
docker build . \
209+
--build-arg BASE_IMAGE=node \
210+
-t evodim/strapi-azure:v2.5.30
211+
```
212+
213+
**Tip:** Combine `BASE_IMAGE` and `NODE_VERSION` to target specific architectures and Node.js versions for your deployment needs.
214+
179215
## Example: Full Azure Infrastructure
180216

181217
Here's a complete Azure setup example for hosting Strapi in production:
@@ -221,15 +257,15 @@ This image follows a structured versioning strategy to ensure compatibility and
221257
222258
| Image Version | Strapi Version | Description |
223259
|---------------|----------------|-------------|
224-
| `v25.28.00` | Strapi 5.x | Image v2 with Strapi 5, build 28 | Docker image version minor 0
225-
| `v25.30.00` | Strapi 5.x | Image v2 with Strapi 5, build 30 | Docker image version minor 0
226-
| `v25.30.01` | Strapi 5.x | Image v2 with Strapi 5, build 30 | Docker image version minor 1 (fixes or enhancements for same strapi version)
260+
| `v2.5.28` | Strapi 5.x | Image v2 with Strapi 5, build 28 | Docker image version minor 0
261+
| `v2.5.30` | Strapi 5.x | Image v2 with Strapi 5, build 30 | Docker image version minor 0
262+
| `v2.5.30` | Strapi 5.x | Image v2 with Strapi 5, build 30 | Docker image version minor 1 (fixes or enhancements for same strapi version)
227263
228264
### Available Tags
229265
230266
- **`latest`** - Always points to the most recent stable release
231-
- **`v25.28.00`** - Specific version for production deployments
232-
- **`dev`** - Development version with additional debugging tools
267+
- **`v2.5.28`** - Specific version for production deployments
268+
- **`preview`** - Preview version, pre release
233269
234270
### Release Types
235271
@@ -246,12 +282,6 @@ This image follows a structured versioning strategy to ensure compatibility and
246282
- Breaking changes in Strapi API
247283
- Significant feature additions
248284
249-
**🔧 Image Updates (v2 → v3)**
250-
251-
- Docker image architecture changes
252-
- Base image updates (Node.js versions)
253-
- Major Azure integration changes
254-
255285
### Usage Recommendations
256286
257287
**For Production:**

image/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Build stage
22
ARG NODE_VERSION="22-alpine"
3-
FROM node:${NODE_VERSION} AS base-image
3+
# Use build argument to specify base image
4+
# arm64v8/node for ARM architecture
5+
ARG BASE_IMAGE="node"
6+
FROM ${BASE_IMAGE}:${NODE_VERSION} AS base-image
47

58
FROM base-image
69
# Set build arguments and environment

image_develop/Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)