Skip to content

Commit

Permalink
Removed UBI 7 container
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordcp committed Apr 12, 2024
1 parent 0b10a4c commit 4799ca8
Showing 1 changed file with 1 addition and 44 deletions.
45 changes: 1 addition & 44 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ USER ${USER_UID}

#############################################################

FROM registry.access.redhat.com/ubi7/ubi-minimal:7.9 AS builder-ubi
FROM redhat/ubi8-minimal:8.9 AS builder-ubi

# Update the builder packages and create user
RUN microdnf update && rm -rf /var/cache/yum && \
Expand All @@ -43,49 +43,6 @@ RUN microdnf update && rm -rf /var/cache/yum && \

#############################################################

FROM registry.access.redhat.com/ubi7/ubi-minimal:7.9 as cass-config-builder-ubi

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."

# Update base packages
RUN microdnf update && \
rm -rf /var/cache/yum && \
microdnf install java-1.8.0-openjdk-headless && \
microdnf clean all

# Copy user accounts information
COPY --from=builder-ubi /etc/passwd /etc/passwd
COPY --from=builder-ubi /etc/shadow /etc/shadow
COPY --from=builder-ubi /etc/group /etc/group
COPY --from=builder-ubi /etc/gshadow /etc/gshadow

# Install the uber jar
COPY --from=builder --chown=cassandra:root --chmod=444 build/docker/*.jar /usr/local/bin/

# Install definition files
COPY --from=builder --chown=cassandra:root --chmod=444 build/docker/definitions /definitions

COPY --from=builder --chown=cassandra:root --chmod=555 build/docker/bin/* /usr/local/bin/

COPY --from=builder --chown=cassandra:root --chmod=444 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"]

#############################################################

# Build the UBI8 image
FROM redhat/ubi8-minimal:8.9 as cass-config-builder-ubi-8
LABEL maintainer="DataStax, Inc <[email protected]>"
Expand Down

0 comments on commit 4799ca8

Please sign in to comment.