title: Docker not loading class path
body: <p>I'm trying to connect to a remote hosted mysql ,but docker run is not loading driver, gives <code>classnotfounderror</code>.</p>
  
  <pre><code>ClassNotFoundException: com.mysql.cj.jdbc.Driver
  appreciate help! thanks.
  </code></pre>
  
  <p>--</p>
  
  <pre><code>FROM java:8-jdk-alpine
  RUN apk get update 
  RUN apk --no-cache add curl
  RUN curl -L -o /mysql-connector-java-5.1.34.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar
  COPY . /tmp
  WORKDIR /tmp
  EXPOSE 3307 3306
  CMD ["java","-classpath","mysql-connector-java-5.1.34.jar:.","com.smartworks.JavaMySQLConnection"]
  </code></pre>