Skip to content
Example for a java runtime 8 container image with rhel7-minimal
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile
README.md
deployment.yaml
run-java.sh

README.md

A Java 8 Runtime example

FROM registry.access.redhat.com/rhel7-minimal

USER root

RUN microdnf --enablerepo=rhel-7-server-rpms
install java-1.8.0-openjdk --nodocs ;
microdnf clean all

ENV JAVA_HOME /etc/alternatives/jre

RUN mkdir -p /app

EXPOSE 8080

COPY demo-thorntail.jar /app/

COPY run-java.sh /app/

RUN chmod 755 /app/run-java.sh

CMD [ "/app/run-java.sh" ]

How to build

Building the image with docker

docker build -t rhel_mpdemo:latest .

Running the image with docker

docker run -d -t --name=rhel_mpdemo -p 8080:8080 -i rhel_mpdemo:latest

Building with buildah

buildah bud -t rhel_mpdemo .

Running with buildah

Buildah from rhel_mpdemo

rhel7-jre-image

You can’t perform that action at this time.