Fixes https://snyk.io/vuln/SNYK-ALPINE311-OPENSSL-587980
Even though webdis doesn't use TLS, some images could be built from the
webdis image and therefore use a vulnerable version of openssl. The fix
is in version 1.1.1g and Alpine currently has 1.1.1i.
After this change, snyk no longer report any know vulnerabilities in the
Docker image.
* Use `localtime_r` instead of `localtime`
* Use correct argument type in callback to `msgpack_packer_new`
* Address FIXME in conf.c
* Remove redundant check in websocket.c
Current test suite pass with python-msgpack v0.2 but fails with python-msgpack
v0.3 and later due to changes in the library. Modern distributions ship
python-msgpack > 0.3 for very long time ago.
The Dockerfile used to refer to the latest published tag for Webdis.
This meant updating the file every time a new release was published.
This change uses the GitHub API to find the latest tag before
downloading and building the corresponding release.
Formatting changes:
* Added `{}` after each single-line `if` (see "goto fail" bug).
* Added spaces around operators
Object key changes: reviewed the docs and selected more appropriate
names for various object keys.
This provides a way to start webdis with dynamic port allocation and
discover HTTP port number by simply grepping logs i.e. without need to
use netstat or sockstat that are not available on some architectures.
Dynamic port allocation is a feature that can be used to run webdis
ad-hoc for testing purpose.
* Change base image to Alpine 3.11.3
* Use multi-stage build (reducing size from 276 MB to 9.5 MB)
* Change Makefile to build with -O3 instead of -O0 -ggdb