Broader Frontends
Author : Kazuhiro Hara
Article permalink

Notes on starting a Hummingbird Docker container

Hummingbird is a server-side framework written in Swift. It is the same kind of framework as Vapor, which I also cover on this site.

The latest version of Hummingbird is currently v2.5.0. Version 2.0.0 came out in September, so the release pace feels quite fast.

When you create a new project with Vapor, it includes configuration files for starting it as a Docker container, and Hummingbird includes similar files too. However, it does not include a configuration file for docker compose, so if you need one, you have to create it yourself.

Since a Dockerfile is included, I tried building an image and starting a container.

$ docker build . -t hummingbird:latest

...

 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)

A warning appears during the build, so if it bothers you, it is worth fixing. Once the image has been created, you can start the container like this:

$ docker run --name hummingbird-latest -p 8080:8080 -it XXXXXXXXXXXX

Then the Hummingbird app starts without much fuss.

HummingbirdSwift

Share