mini_httpd is a small HTTP server (mini_httpd/1.21 18oct2014)
50K+
mini_httpd is a small HTTP server.
In the instructions that follow, replace <home-directory> with the path of the local directory you want to serve content from, and <http-port> with the HTTP port you want the HTTP server to serve content to (e.g. 80 for the standard HTTP port if not already in use on the host).
$ sudo docker run --rm -t -v <home-directory>:/var/www/localhost/htdocs -p <http-port>:80 sebp/mini_httpd
Add the following lines in an existing or a new docker-compose.yml file:
minihttpd:
image: sebp/mini_httpd
volumes:
- <home-directory>:/var/www/localhost/htdocs
ports:
- "<http-port>:80"
Then start a mini_httpd container with:
$ sudo docker-compose up minihttpd
First clone or download the spujadas/mini_httpd-docker GitHub repository, open a shell in the newly created mini_httpd-docker directory, then build the image and run a container using Docker or Docker Compose, as explained below.
This command will build the image:
$ sudo docker build .
Build the image with this command:
$ sudo docker-compose build
Written by Sébastien Pujadas, released under the MIT license.
Content type
Image
Digest
sha256:7926853b3…
Size
2.4 MB
Last updated
about 11 years ago
docker pull sebp/mini_httpd