h2o webserver with docker

h2o was one of the earliest webserver supporting http2. To make the usability just a bit more convinient I packaged it as Docker image. Available at lkwg82/h2o-http2-server and will be kept in sync with new versions.

What is h2o?

H2O is a new generation HTTP server that provides quicker response to users with less CPU utilization when compared to older generation of web servers. Designed from ground-up, the server takes full advantage of HTTP/2 features including prioritized content serving and server push, promising outstanding experience to the visitors of your web site.


source: https://h2o.examp1e.net/

How to do?

a simple run

$ docker run -p "8080:80" -ti lkwg82/h2o-http2-server
asciinema player

with external configuration at your current location

$ docker run -p "8080:80" -v "$(pwd)/etc/h2o" -ti lkwg82/h2o-http2-server

with docker-compose

File: docker-compose.yml
version: '2'

    image: lkwg82/h2o-http2-server
       - "444:443"
       - "/etc/h2o:/etc/h2o"
       - "/etc/letsencrypt:/etc/letsencrypt"
       - "/var/log/h2o:/var/log/h2o"
    working_dir: /etc/h2o
    restart: always

and run it

$  docker-compose up -d --force-recreate h2o

As you can see in the configuration snippet for docker-compose I offer https endpoints and use the infrastructure of letsencrypt.org. More about that in the next posts.