Hello everyone! Welcome to another one of my blogs! A quick update, I now have a website for leaving feedback to my projects, blogs, etc. feel free to check that out! Link is: https://leavenote.ireview.games/ Anyways, this blogpost will be about creating your own docker blueprints(docker files), so, lets begin! Often, you want to set up a docker container on multiple machines, and you don't want to do it manually, so how do you do such a thing? Well, you create a blueprint file called Dockerfile, then you build it, maybe upload the image somewhere, and distribute it along your network of servers! So, lets create one of our own `emacs ./Dockerfile` First, we will begin with a FROM keyword, which specifies what linux distro(or just a container), we want to copy as our base, because you rarely need to make your own linux from scratch :D Lets start with a basic ubuntu package! FROM ubuntu:latest Now, lets run some commands on our ubuntu package. Its important to note that the commands with the keyword RUN will be ran at build time, rather than runtime, therefore they will stay in the same state unless you rebuild the container. You also cannot really interact with the run commands, so they are gotta be script friendly(therefore the -y in the apt install) `RUN apt update` `RUN apt -y install neofetch` `RUN apt clean` Now, lets copy some of our custom files into our container! We will specify our source path of the host system first, and then the target path in the container. `COPY ./hostname /etc/hostname` And now, we can expose ports, in case we want to run a network service. The host port doesn't have to specified, since its specified once we are running the container. `EXPOSE 8081` This exposes the port 8081 to the host(if configured in the docker run command). And after the container is build, we can specify exactly one command that will run each time the container starts, with the keyword CMD, like so CMD ["/bin/bash", "-c", "neofetch && sleep infinity"] First argument being the executable, and other ones being the command arguments. Now, we can build the container using a simple: docker build -t . and its done! This will be all for today, see you next time!