Skip to content

Commit

Permalink
updating boot hello to 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
burrsutter committed Feb 3, 2020
1 parent 283e149 commit ea7bffa
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion hello/springboot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8u151
ENV JAVA_APP_JAR boot-demo-0.0.1.jar
ENV JAVA_APP_JAR boot-demo-1.0.0.jar
WORKDIR /app/
COPY target/$JAVA_APP_JAR .
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion hello/springboot/Dockerfile.openshift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
WORKDIR /work/
ENV JAVA_APP_JAR boot-demo-0.0.1.jar
ENV JAVA_APP_JAR boot-demo-1.0.0.jar
# the following is not needed on this Red Hat created image
# RUN chgrp -R 0 /work && \
# chmod -R g=u /work
Expand Down
2 changes: 1 addition & 1 deletion hello/springboot/Dockerfile_Java11
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:11
ENV JAVA_APP_JAR boot-demo-0.0.1.jar
ENV JAVA_APP_JAR boot-demo-1.0.0.jar
WORKDIR /app/
COPY target/$JAVA_APP_JAR .
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion hello/springboot/Dockerfile_Memory
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8u151
ENV JAVA_APP_JAR boot-demo-0.0.1.jar
ENV JAVA_APP_JAR boot-demo-1.0.0.jar
WORKDIR /app/
COPY target/$JAVA_APP_JAR .
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion hello/springboot/Dockerfile_Memory2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8
ENV JAVA_APP_JAR boot-demo-0.0.1.jar
ENV JAVA_APP_JAR boot-demo-1.0.0.jar
WORKDIR /app/
COPY target/$JAVA_APP_JAR .
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion hello/springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>com.burrsutter</groupId>
<artifactId>boot-demo</artifactId>
<version>0.0.1</version>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>helloboot</name>
Expand Down
23 changes: 11 additions & 12 deletions hello/springboot/readme.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
Intial pom.xml created by start.spring.io
Initial pom.xml created by start.spring.io

mvn clean compile package

java -jar target/boot-demo-0.0.1.jar
java -jar target/boot-demo-1.0.0.jar
or
mvn spring-boot:run
curl http://localhost:8080/
ctrl-c

Manual Deployment

docker build -f Dockerfile -t dev.local/burrsutter/boot-demo:0.0.1 .
docker build -f Dockerfile -t dev.local/burrsutter/boot-demo:1.0.0 .
or
docker build -f Dockerfile.openshift -t dev.local/burrsutter/boot-demo:0.0.1 .
docker build -f Dockerfile.openshift -t dev.local/burrsutter/boot-demo:1.0.0 .

docker login docker.io
docker images | grep boot-demo
docker tag $1 docker.io/burrsutter/boot-demo:0.0.1
docker push docker.io/burrsutter/boot-demo:0.0.1
or
docker login quay.io
docker images | grep boot-demo
docker tag $1 quay.io/burrsutter/boot-demo:0.0.1
docker push quay.io/burrsutter/boot-demo:0.0.1

docker tag $1 docker.io/burrsutter/boot-demo:1.0.0
docker push docker.io/burrsutter/boot-demo:1.0.0

or

docker login quay.io
docker images | grep boot-demo

http://jshift.io/
docker tag $1 quay.io/burrsutter/boot-demo:1.0.0
docker push quay.io/burrsutter/boot-demo:1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MyRESTController {

@RequestMapping("/")
public String sayHello() {
greeting = environment.getProperty("GREETING","Aloha");
greeting = environment.getProperty("GREETING","Hej");
count++;
System.out.println(greeting + " from " + hostname + " " + count);
return greeting + " from Spring Boot! " + count + " on " + hostname + "\n";
Expand Down

0 comments on commit ea7bffa

Please sign in to comment.