Skip to content

Commit

Permalink
* Provide two different Docker Images one for java 8 and one for java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
weissreto committed Oct 20, 2018
1 parent 313a602 commit 8b52818
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:8-jre
RUN wget https://github.com/weissreto/jmx-cli/releases/download/v0.1.0/jmx-cli-0.1.0-linux.zip \
&& unzip jmx-cli-0.1.0-linux.zip -d /app
ENV PATH="/app/jmx-cli-0.1.0/bin:$PATH"
FROM openjdk:11-jdk
RUN wget https://github.com/weissreto/jmx-cli/releases/download/v0.2.0/jmx-cli-0.2.0-linux.zip \
&& unzip jmx-cli-0.2.0-linux.zip -d /app
ENV PATH="/app/jmx-cli-0.2.0/bin:$PATH"
CMD /bin/bash
6 changes: 3 additions & 3 deletions src/docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo docker build . -t rweiw/jmcli:0.1 --no-cache
sudo docker tag rweiw/jmcli:0.1 rweiw/jmcli:latest
sudo docker build . -t rweiw/jmcli:0.2 --no-cache
sudo docker tag rweiw/jmcli:0.2 rweiw/jmcli:latest
sudo docker login
sudo docker push rweiw/jmcli:0.1
sudo docker push rweiw/jmcli:0.2
sudo docker push rweiw/jmcli:latest
5 changes: 5 additions & 0 deletions src/docker/java8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:8-jre
RUN wget https://github.com/weissreto/jmx-cli/releases/download/v0.2.0/jmx-cli-0.2.0-java8-linux.zip \
&& unzip jmx-cli-0.2.0-java8-linux.zip -d /app
ENV PATH="/app/jmx-cli-0.2.0/bin:$PATH"
CMD /bin/bash
5 changes: 5 additions & 0 deletions src/docker/java8/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sudo docker build . -t rweiw/jmcli:0.2-java8 --no-cache
sudo docker tag rweiw/jmcli:0.2-java8 rweiw/jmcli:latest-java8
sudo docker login
sudo docker push rweiw/jmcli:0.2-java8
sudo docker push rweiw/jmcli:latest-java8

0 comments on commit 8b52818

Please sign in to comment.