-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from burmanm/ubi8_base
Add ubi8/openjdk-8 as base image for arm64 UBI support
- Loading branch information
Showing
4 changed files
with
57 additions
and
10 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 |
---|---|---|
@@ -1,18 +1,14 @@ | ||
# Copyright DataStax, Inc. | ||
# Please see the included license file for details. | ||
FROM --platform=${BUILDPLATFORM} maven:3.9.2-eclipse-temurin-8 as builder | ||
FROM --platform=${BUILDPLATFORM} maven:3.9-eclipse-temurin-8 as builder | ||
|
||
COPY . . | ||
|
||
RUN ./gradlew copyDockerBuildCtx | ||
|
||
# The datastax base image is not multiarch presently, so we use the openjdk | ||
# image as our base for arm builds instead. | ||
FROM --platform=linux/arm64 eclipse-temurin:8u372-b07-jdk as base-arm64 | ||
|
||
FROM --platform=linux/amd64 datastax/ds-base-debian-openjdk-8:latest as base-amd64 | ||
|
||
FROM base-${TARGETARCH} as cass-config-builder | ||
FROM eclipse-temurin:8-jdk as cass-config-builder | ||
|
||
ENV USER_UID=1001 \ | ||
USER_NAME=cass-operator \ | ||
|
@@ -83,3 +79,36 @@ USER cassandra:root | |
ENV PATH=$PATH:/usr/local/bin | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint"] | ||
|
||
# Build the UBI8 image | ||
FROM registry.access.redhat.com/ubi8/openjdk-8:1.18 as cass-config-builder-ubi-8 | ||
LABEL maintainer="DataStax, Inc <[email protected]>" | ||
LABEL name="cass-config-builder" | ||
LABEL vendor="DataStax, Inc" | ||
LABEL release="1.0.0" | ||
LABEL summary="Configuration templating engine for Apache Cassandra®." | ||
LABEL description="Configuration templating engine for Apache Cassandra®. Powers the configuration of containers deployed via the DataStax Kubernetes Operator for Apache Cassandra." | ||
|
||
# Create user | ||
USER root | ||
RUN microdnf install shadow-utils && useradd -r -s /bin/false -U -G root cassandra | ||
|
||
# Install the uber jar | ||
COPY --from=builder build/docker/*.jar /usr/local/bin/ | ||
|
||
# Install definition files | ||
COPY --from=builder build/docker/definitions /definitions | ||
|
||
COPY --from=builder build/docker/bin/* /usr/local/bin/ | ||
|
||
COPY --from=builder build/docker/LICENSE /licenses/ | ||
|
||
# Fix permissions | ||
RUN chown cassandra:root -Rv /usr/local/bin/* && \ | ||
chmod -Rv g+x /usr/local/bin | ||
|
||
USER cassandra:root | ||
|
||
ENV PATH=$PATH:/usr/local/bin | ||
|
||
ENTRYPOINT ["/usr/local/bin/entrypoint"] |
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