@@ -12,14 +12,20 @@ Images in Docker are packets that include the program you are going to be runnin
...
@@ -12,14 +12,20 @@ Images in Docker are packets that include the program you are going to be runnin
Images are saved into a registry like Github, Gitlab or Docker Hub, where you can pull or push them. Registries can be private or public.
Images are saved into a registry like Github, Gitlab or Docker Hub, where you can pull or push them. Registries can be private or public.
### Dockerfile
## Dockerfile
Dockerfile is used by Docker to build images automatically by reading the instructions from it. Dockerfile is a text document, that contains all the necessary commands to assemble an image.
We made a test container named HarmitusApp. We build the image using the official repository for OpenJDK from Docker Hub, which also has the base image from Alpine Linux. Alpine Linux is an optimal choice for the distribution base image thanks to its small size (~5MB).
We made a test container named HarmitusApp. We build the image using the official repository for OpenJDK from Docker Hub, which also has the base image from Alpine Linux. Alpine Linux is an optimal choice for the distribution base image thanks to its small size (~5MB).
Quick breakdown on what we did goes like this:
Quick breakdown on what we did goes like this:
* asd
* Chose the openjdk:8-jre-alpine as our base image (FROM)
* Copied the needed files to the container (COPY)
* Executed the specified files (CMD)
* Opened tons of ports to make sure that traffic gets trough (EXPOSE)
Below you can find the Dockerfile we made for HarmistusApp to assemble a Java image.