To use this makefile you have to:
- install make and docker (and have to have docker permissions)
- run 'make <command>'
- name it like you want
- for non-local use name it <username>/<imagename>
- this should be a version number
- name it really like you want
- in best case the name is connected to the usage
- put the filepath here, where the volume will be mounted inside the container
- on this local port (127.0.0.1:localport) the containerport will be reachable
- on this port your application is listening inside the container
- best: leave it like it is
- these parameters will be given to docker, when it runs the container
- if you do not use any volumes, delete the right part
- if you use multiple volumes, append further -v parameters
- these parameters will be given to docker, when it runs the container
- if you do not use any port forwards, delete the right part
- if you use multiple forwards, append further -p parameters
- build the container (assuming there is a Dockerfile in the same directory)
- tag it (give a name to it)
- build the container like before but without using the cache
- run the container with the volume mounted
- remove the container after it shuts down
- like test, but start an interactive bash shell inside the container
- first build, then test the container
- start the container in background
- define a restart policy
- assign a global name to the running container
- mount the volume
- try to stop the deployed (named) container
- remove the shut down container
- first undeploy, then redeploy the container
- equals a restart of the container, but by creating a new container
- useful, if a new container version has been built in the background
- first build, then redeploy the container
- useful to replace the container with a new version, that first needs to be build
- make sure, the newly built container has no runtime errors: There will probably be no previous version to restore
- if the built process fails, the redeployment will not happen
- try to remove the volume
- try to remove the container
- first try to remove the volume, then the container