Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

spring boot docker

FROM java:8-jdk-alpine

COPY ./target/demo-docker-0.0.1-SNAPSHOT.jar /usr/app/

WORKDIR /usr/app

RUN sh -c 'touch demo-docker-0.0.1-SNAPSHOT.jar'

ENTRYPOINT ["java","-jar","demo-docker-0.0.1-SNAPSHOT.jar"]
Comment

spring boot dockerfile

# For Java 8, try this
# FROM openjdk:8-jdk-alpine

# For Java 11, try this
FROM adoptopenjdk/openjdk11:alpine-jre

# Refer to Maven build -> finalName
ARG JAR_FILE=target/spring-boot-web.jar

# cd /opt/app
WORKDIR /opt/app

# cp target/spring-boot-web.jar /opt/app/app.jar
COPY ${JAR_FILE} app.jar

# java -jar /opt/app/app.jar
ENTRYPOINT ["java","-jar","app.jar"]
Comment

dockerfile for spring boot app

FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
Comment

dockerfile spring boot

FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]COPY
Comment

docker create spring boot image

./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=springio/gs-spring-boot-dockerCOPY
Comment

docker spring boot

sudo docker build -t [jar file] .
Comment

docker create spring boot image

FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]COPY
Comment

docker create spring boot image

docker build -t springio/gs-spring-boot-docker .COPY
Comment

PREVIOUS NEXT
Code Example
Java :: java class in dataweave 
Java :: java unique queue 
Java :: do function after time android studio 
Java :: double to string in java without tovalue 
Java :: generate random number using math.random in java 
Java :: how to disable text field java 
Java :: regex pattern for valid identifiers 
Java :: declare id in java 
Java :: javafx list view does not update 
Java :: how to know if a file is iso-8859-1 encoded in java 
Java :: treeset java descending order using comparator 
Java :: foreach skip to next java 
Java :: exception handling in java 
Java :: java swing border 
Java :: how to print all package in java 
Java :: android get app build name 
Java :: Compare two csv files using java 
Java :: Java Create a ByteArrayInputStream 
Java :: display 2d array 
Java :: where to use findviewbyid in fragment 
Java :: java get number at the end of string 
Java :: java math random 
Java :: java packages example 
Java :: long java 
Java :: groovy if else 
Java :: java switch tutorial 
Java :: for() in java 
Java :: data structures in java 
Java :: switch in java 
Java :: java append to array 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =