8000 GitHub - njmittet/alpine-temurin: JDK or JRE base image based on Eclipse Temurin and Alpine Linux.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

njmittet/alpine-temurin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alpine-temurin

A JDK or JRE base image based on Eclipse Temurin and Alpine Linux.

See the image on Docker Hub.

Usage

The JRE image is intended to be used as a base image for running Java application images:

FROM njmittet/alpine-temurin:17-jre

USER root
ENV JAVA_DIR /opt/java

RUN mkdir -p $JAVA_DIR && \
    adduser -D -h $JAVA_DIR java

USER java
WORKDIR $JAVA_DIR
COPY application.jar $JAVA_DIR

EXPOSE 9000
CMD ["java", "-jar", "application.jar"]

The JDK image is intended to be used in the build stage of a multi-stage Docker build:

FROM njmittet/alpine-temurin:17-jdk AS builder

WORKDIR /tmp

RUN apk add --update git && \
    git clone https://github.com/njmittet/demo-application.git && \
    cd demo-application && \
    ./gradlew build

FROM njmittet/alpine-temurin:17-jre

USER root
ENV JAVA_DIR /opt/java

RUN mkdir -p $JAVA_DIR && \
             adduser -D -h $JAVA_DIR java

USER java
WORKDIR $JAVA_DIR

COPY --from=builder /tmp/demo-application/build/libs/application.jar .

EXPOSE 8080
CMD ["java", "-jar", "application.jar"]

About

JDK or JRE base image based on Eclipse Temurin and Alpine Linux.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0