Yes, I know
How to Run a Web Server from a Docker Container?

Installing and running a web server in just a few seconds. Just a dream? No—​and in fact it is pretty easy to achieve using Docker containers! Even better, once you know how to do it, you could run many other kinds of servers exactly the same way…​ Containers are a great way to start services with a minimum overhead and little to no configuration issues. This has tremendous advantages in production. But for development and educative purposes, this is also a great tool.

 View on YouTube 

How to Run a Web Server from a Docker Container?

The only drawback when you’ve never used them before, is you have to become familiar with the basic vocabulary and tools used to manage the lifecycle of your containers.

This is what I address in my latest video. There you will see how to create, start and stop a web server in a Docker container. Even if I focus there on setting up an HTTP server, all the Docker commands, and workflow I show and explain could be used with any kind of server—​as long as there is a docker image readily available on the Docker Hub or elsewhere on the web.

Don’t hesitate to share/like/comment the video. I would be especially curious to know what you’ve used docker for after having viewed that!

What if I don’t have Docker installed?

If you haven’t yet installed Docker on your computer, check my previous video:

What is the target audience?

To follow the instructions given here, you must have access to a working Linux system and being able to open a root session there.

On many systems today, that simply means being able to issue one of these commands:

    # Require the current user being in the sudo group
    # May need to provide your *own* password
    sudo /bin/bash   # explicitly request a Bash shell
    sudo /bin/su     # use root's default shell


    # Require the *root* password
    su --shell /bin/bash   # explicitly request a Bash shell
    su                     # use root's default shell

I used the Bash shell on the videos. But all commands should work exactly the same with a different shell.