Skip to content

Commit

Permalink
native arm container build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Jun 9, 2024
1 parent 51b0f30 commit a370a64
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_publish_native_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
java-type: 'native'
java-distribution: 'graalvm'
java-version: '22-ea'
maven-options: ' -Pnative native:compile'
maven-options: ' -Pnative,buildreact native:compile'
docker-file: './src/main/docker/Dockerfile.native'
docker-platforms: linux/amd64
docker-tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{github.event.repository.name}}:${{ github.ref_name }}-amd64native,${{ secrets.DOCKERHUB_USERNAME }}/${{github.event.repository.name}}:latest-amd64native
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- native arm container build workflow

### Fixed

- build.properties metadata in native image
- buildreact profile in native amd64 workflow

## [1.0.0] - 2024-06-09

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Refer to [Spring Boot Documentation](https://docs.spring.io/spring-boot/docs/cur
Build spring application (jar)

```shell
mvn clean package -P buildreact,metadata
mvn clean package -P buildreact
```

Build container openjdk
Expand Down
10 changes: 3 additions & 7 deletions src/main/docker/Dockerfile.build.native
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ FROM ghcr.io/graalvm/jdk:22.3.2 AS build

# Update package lists and Install Maven
RUN microdnf update -y && \
microdnf install -y maven gcc glibc-devel zlib-devel libstdc++-devel gcc-c++ && \
microdnf install -y maven git gcc glibc-devel zlib-devel libstdc++-devel gcc-c++ && \
microdnf clean all

WORKDIR /usr/src/app

# Copy pom.xml and download dependencies
COPY pom.xml .
RUN mvn dependency:go-offline

COPY . .

RUN mvn -Pnative native:compile
RUN git clone https://github.com/fugerit-org/springboot-photobook.git
RUN -Pnative,buildreact native:compile

# Second stage: Lightweight debian-slim image
FROM debian:bookworm-slim
Expand Down

0 comments on commit a370a64

Please sign in to comment.