diff --git a/h2o/Dockerfile b/h2o/Dockerfile new file mode 100644 index 0000000..58dcb30 --- /dev/null +++ b/h2o/Dockerfile @@ -0,0 +1,32 @@ +# +# Dockerfile for h2o +# + +FROM alpine +MAINTAINER kev + +RUN apk add -U build-base \ + cmake \ + curl \ + linux-headers \ + zlib-dev \ + && curl -sSL https://github.com/h2o/h2o/archive/master.tar.gz | tar xz \ + && cd h2o-master \ + && cmake -DWITH_BUNDLED_SSL=on . \ + && make install \ + && cd .. \ + && rm -rf h2o-master \ + && apk del build-base \ + cmake \ + curl \ + linux-headers \ + zlib-dev \ + && rm -rf /var/cache/apk/* + +COPY h2o.conf /etc/ + +WORKDIR /var/www/html + +EXPOSE 80 443 + +CMD ["h2o", "-c", "/etc/h2o.conf"] diff --git a/h2o/README.md b/h2o/README.md new file mode 100644 index 0000000..6ce1fd6 --- /dev/null +++ b/h2o/README.md @@ -0,0 +1,16 @@ +h2o +=== + +[H2O][1] is a new generation HTTP server providing quicker response to users when +compared to older generation of web servers. + +## Quick Start + +``` +$ mkdir html +$ echo 'hello world' > html/index.html +$ docker run -d -p 8080:80 -v html:/var/www/html vimagick/h2o +$ curl localhost:8080 +``` + +[1]: https://h2o.examp1e.net/index.html diff --git a/h2o/h2o.conf b/h2o/h2o.conf new file mode 100644 index 0000000..96c6b74 --- /dev/null +++ b/h2o/h2o.conf @@ -0,0 +1,7 @@ +hosts: + "*:80": + listen: + port: 80 + paths: + /: + file.dir: /var/www/html