Skip to content

sshaaf/rhel7-jre-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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