Could you tell me how to start the jar package with docker to mount the required folder?

starting the jar package with java-jar in the current directory depends on the three files selected. How to mount the three files if you use docker to launch the jar package in the container on linux
Thank you

Mar.13,2021

do you have such a command in your Dockerfile:
set the working directory to / app, and transfer the files in the current directory to the / app directory in the image

WORKDIR /app
COPY ./ /app

then execute the command when the container starts

CMD java -jar tracker-server.jar

that is to say, there is no mount problem. Just copy the three required files directly into the image.

I hope I can help you.

Menu