- First of all, ensure that docker is properly installed on your machine. Run the following command to check the version:
sudo docker version
If the preceding command fails, then visit the installation pages listed earlier.
- Assuming we are inside the Hello-Akka project, create a directory inside the Hello-Akka project, say, dockerApp, where we will keep our Docker file and other stuff.
- Now create a folder inside dockerApp, say, docker, where we will copy our application assembly jar.
- Create a bash script, say, dockerize.sh, inside the dockerApp directory and place the following commands inside it:
#!/bin/bash echo "====================Removing target before making assembly================================" rm -fr ../target ...