Guest User

Dockerfile JDBC

a guest
Feb 4th, 2020
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Dockerfile: create the image for jdbc testing ('local-dbtest')
  2. FROM openjdk:8-jdk-alpine
  3.  
  4. RUN mkdir /code
  5.  
  6. COPY ./*.java /code
  7.  
  8. RUN mkdir /opt
  9. ADD https://jdbc.postgresql.org/download/postgresql-42.1.4.jar /opt
  10. #COPY ./postgresql-42.1.4.jar /opt
  11.  
  12. RUN cd /code && javac DBTest.java
  13.  
  14. CMD java -classpath "/code:/opt/*" DBTest
RAW Paste Data