-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/m1 docker build support (#376)
* feature/m1-docker-build-support - separate jammy and alpine - add zilla version as env var - add the docker platform to properties - don't need to use alpine for build * docker image tagging options separate alpine base image from the default image and add more tagging options * set the version env var in the alpine build * remove the suffix for local build * make version tagging more explicit for each profile * move the alpine specific builds into the docker-image module * reduce the folder complexity and add child pom placeholders * revert the docker-image pom to develop * Use buildx for multi-arch images, build alpine image for release only * Move inline assembly to descriptor file and reference from alpine image --------- Co-authored-by: John Fallows <john.r.fallows@gmail.com>
- Loading branch information
Showing
5 changed files
with
168 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!-- | ||
Copyright 2021-2023 Aklivity Inc | ||
Licensed under the Aklivity Community License (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at | ||
https://www.aklivity.io/aklivity-community-license/ | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd"> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${settings.localRepository}</directory> | ||
<outputDirectory>./</outputDirectory> | ||
<useDefaultExcludes>false</useDefaultExcludes> | ||
<includes> | ||
<include>io/aklivity/zilla/zilla/**</include> | ||
<include>io/aklivity/zilla/runtime/**</include> | ||
<include>io/aklivity/zilla/engine/**</include> | ||
<include>io/aklivity/zilla/binding-*/**</include> | ||
<include>io/aklivity/zilla/catalog-*/**</include> | ||
<include>io/aklivity/zilla/exporter-*/**</include> | ||
<include>io/aklivity/zilla/guard-*/**</include> | ||
<include>io/aklivity/zilla/metrics-*/**</include> | ||
<include>io/aklivity/zilla/validator-*/**</include> | ||
<include>io/aklivity/zilla/vault-*/**</include> | ||
<include>io/aklivity/zilla/command/**</include> | ||
<include>io/aklivity/zilla/command-*/**</include> | ||
<include>io/aklivity/zilla/manager/**</include> | ||
<include>io/aklivity/zilla/incubator/**</include> | ||
<include>org/agrona/**</include> | ||
<include>org/apache/apache/**</include> | ||
<include>org/apache/avro/**</include> | ||
<include>org/apache/maven/maven/**</include> | ||
<include>org/apache/maven/maven-parent/**</include> | ||
<include>jakarta/json/**</include> | ||
<include>jakarta/inject/**</include> | ||
<include>org/leadpony/justify/**</include> | ||
<include>org/leadpony/joy/**</include> | ||
<include>org/snakeyaml/snakeyaml-engine/**</include> | ||
<include>org/eclipse/yasson/**</include> | ||
<include>org/glassfish/**</include> | ||
<include>com/github/rvesse/**</include> | ||
<include>com/guicedee/**</include> | ||
<include>org/eclipse/ee4j/**</include> | ||
<include>com/ibm/icu/**</include> | ||
<include>org/bitbucket/b_c/jose4j/**</include> | ||
<include>org/slf4j/**</include> | ||
<include>org/antlr/**</include> | ||
<include>org/sonatype/oss/**</include> | ||
<include>com/fasterxml/oss-parent/**</include> | ||
<include>com/fasterxml/jackson/**</include> | ||
<include>org/yaml/snakeyaml/**</include> | ||
<include>org/junit/**</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
cloud/docker-image/src/main/docker/release/alpine.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Copyright 2021-2023 Aklivity Inc | ||
# | ||
# Licensed under the Aklivity Community License (the "License"); you may not use | ||
# this file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# https://www.aklivity.io/aklivity-community-license/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OF ANY KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations under the License. | ||
# | ||
|
||
FROM eclipse-temurin:20-alpine AS build | ||
|
||
COPY maven /root/.m2/repository | ||
|
||
COPY ../zpmw zpmw | ||
COPY ../zpm.json.template zpm.json.template | ||
|
||
RUN apk add --no-cache gettext | ||
RUN cat zpm.json.template | env VERSION=${project.version} envsubst > zpm.json | ||
|
||
RUN apk add --no-cache wget | ||
RUN ./zpmw install --debug --exclude-remote-repositories | ||
RUN ./zpmw clean --keep-image | ||
|
||
FROM alpine:3.18.3 | ||
|
||
ENV ZILLA_VERSION ${project.version} | ||
|
||
COPY --from=build /.zpm /opt/zilla/.zpm | ||
COPY --from=build /zilla /opt/zilla/zilla | ||
COPY ../zilla.properties /opt/zilla/.zilla/zilla.properties | ||
|
||
ENTRYPOINT ["/opt/zilla/zilla"] |