- Get a good base image for building the application, like ubuntu
- Install necessary build dependencies on the base image
- Copy the
nginx-1.19.2.tar.gz
file inside the image - Extract the contents of the archive and get rid of it.
- Configure the build, compile and install the program using the make tool.
- Get rid of the extracted source code.
- Run nginx executable.