Reputation: 2062
I am trying to run a docker container with a mysql database instance. This is a straight forward web server/ db implementation.
The docker file
FROM openjdk:8-jdk-alpine
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
The Application.java file
package com.company.app;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
I am setting the environment variables like so
set AV_DATABASE_URL=jdbc:mysql://localhost:3306/AlgorithmVisualization?serverTimezone=UTC
set DATABASE_USER=root
set DATABASE_PASSWORD=test123
set AV_SCHEMA=AlgorithmVisualization
To run the dockerfile I am using the command
docker run -p 3307:3306 -e MYSQL_ROOT_PASSWORD=test123 -e MYSQL_DATABASE=AlgorithmVisualization mysql:5.7
Expected The web server and the database should start up after running the docker command.
Actual The following error is produced
Error response from daemon: mkdir /var/lib/docker/overlay2/1b82892bacfb2a69e7cd5c71707d1b19519783f0df1edfaa29f0ab50d764e705-init: read-only file system.
Upvotes: 2
Views: 7931