https://github.com/spujadas/mini_httpd-docker
Docker image for mini_httpd, a small HTTP server
https://github.com/spujadas/mini_httpd-docker
Last synced: 5 months ago
JSON representation
Docker image for mini_httpd, a small HTTP server
- Host: GitHub
- URL: https://github.com/spujadas/mini_httpd-docker
- Owner: spujadas
- License: mit
- Created: 2015-07-12T17:13:35.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T21:05:25.000Z (about 11 years ago)
- Last Synced: 2025-09-03T08:52:40.666Z (11 months ago)
- Size: 113 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mini_httpd Docker image
[mini_httpd](http://www.acme.com/software/mini_httpd/) is a small HTTP server.
### Contents
- Usage
- Start a container with Docker
- Start a container with Docker Compose
- Build
- Build with Docker
- Build with Docker Compose
- About
## Usage
In the instructions that follow, replace `` with the path of the local directory you want to serve content from, and `` 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).
### Start a container with Docker
$ sudo docker run --rm -t -v :/var/www/localhost/htdocs -p :80 sebp/mini_httpd
### Start a container with Docker Compose
Add the following lines in an existing or a new `docker-compose.yml` file:
minihttpd:
image: sebp/mini_httpd
volumes:
- :/var/www/localhost/htdocs
ports:
- ":80"
Then start a mini_httpd container with:
$ sudo docker-compose up minihttpd
## Build
First clone or download the [spujadas/mini_httpd-docker](https://github.com/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.
### Build with Docker
This command will build the image:
$ sudo docker build .
### Build with Docker Compose
Build the image with this command:
$ sudo docker-compose build
## About
Written by [Sébastien Pujadas](http://pujadas.net), released under the [MIT license](http://opensource.org/licenses/MIT).