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 :: android studio listview arrayadapter 
Java :: if number is negative java 
Java :: select photo from camera android 
Java :: java summe array 
Java :: in java how to throw exception from function 
Java :: literals in java 
Java :: simple login password and username java 
Java :: how to add 2 numbers in java 
Java :: mobile number validation to edittext in android 
Java :: Java how to make a number with digits 
Java :: start activity intent 
Java :: frequency of each element from list in java 
Java :: printing arraylist 
Java :: java install in fedora 
Java :: set ImageView size programmatically android 
Java :: how to print to the console in java 
Java :: java check if number is in range 
Java :: int array java 
Java :: How to find the next greater permutation of a list of numbers, in Java? 
Java :: java eclipse console clear 
Java :: hello world java code 
Java :: remove first and last character from string in java 
Java :: viewpager2 dependency 
Java :: set image programmatically android 
Java :: java extract zip 
Java :: java print pdf to printer 
Java :: send data from service to activity class 
Java :: find length of array java 
Java :: java write in a file without overwriting 
Java :: android studio edittext enter pressed 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =