Skip to content

Provide Dockerfile for self build Image? #714

Answered by flomickl
flomickl asked this question in Q&A
Discussion options

You must be logged in to vote

I created a Containerfile by myself using the ubi9 (RHEL) image and a non-root user.
Maybe this is helpful for other users as well.

Stored in my example as containerfile

FROM registry.access.redhat.com/ubi9/ubi-minimal

ARG PLANETILER_VERSION=0.7.0

USER root

RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y java-21-openjdk-devel wget shadow-utils && \
    rm -rf /var/cache/yum

# Set Java environment variables
ENV JAVA_HOME="/usr/lib/jvm/java-21"
ENV JAVA_VENDOR="openjdk"
ENV JAVA_VERSION="21"

# planetiler version
ENV PLANETILER_VERSION=${PLANETILER_VERSION}

#ROOTLESS USER AND GROUP
ENV CNB_USER_ID=1001
ENV CNB_GROUP_ID=1001

#default value
ENV JAVA_TOOL_OPT…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@flomickl
Comment options

Comment options

You must be logged in to vote
1 reply
@msbarry
Comment options

Answer selected by flomickl
Comment options

You must be logged in to vote
1 reply
@msbarry
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants