You'll need to have the Docker tools installed, which you can get from https://www.docker.com/products/docker. In my case, I used Docker for Windows, but it shouldn't make any difference which platform you're on.
If you're not familiar with Docker, you can read more about it at Docker.com.
Text in bold denotes commands to be run at the prompt.
- Open a Command Prompt, or console and create a working folder (mkdir unimus), then change into that directory (cd unimus)
- Create a subfolder called content (mkdir content), and download a copy of Unimus.jar into the content folder using your web browser.
- In the working folder, create a file called Dockerfile, with the following contents:
You can use your favourite text editor to do this, or do it from the Windows command line by typing type NUL > Dockerfile and then notepad Dockerfile then copy and paste the text above and choose File -> Save.
Code: Select all
FROM java:8 ADD content /usr/src/app WORKDIR /usr/src/app ENTRYPOINT ["java", "-jar", "./Unimus.jar"] EXPOSE 8085
- Run docker build -t unimus . to build an image called unimus from the current directory
- You can now run the image with the command docker run -P 8085:8085 unimus
- You should be able to access the Unimus UI by navigating to http://localhost:8085 in your web browser.
- You can push the image to a local instance of Docker Registry if you need to run it on another machine.
- I recommend using a separate database, rather than the file-based HSQL option, as it will allow you to update Unimus easily without losing any data.