awslabs / flowgger

A fast data collector in Rust
BSD 2-Clause "Simplified" License
834 stars 55 forks source link

Lower docker image size and switch to OpenSSL in docker image #50

Closed Trojan295 closed 5 years ago

Trojan295 commented 5 years ago

Issue #, if available: none

Description of changes: This PR updates the Dockerfile, by changing LibreSSL to OpenSSL there and lowering the output image size do 76MB, by using a multi-stage Docker build and debian:buster-slim as a base image

--

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jedisct1 commented 5 years ago

Maybe we should switch back to using OpenSSL instead of LibreSSL, especially since LibreSSL still doesn't support TLS 1.3 AFAIK.

Rust currently doesn't work well on Alpine Linux. It assumes that everything is static, which breaks features such as procedural macros. The Rust packages shipped with Alpine Linux contain custom patches to work around this and there's a discussion in the Rust issue tracker about a different approach to solve that problem.

Trojan295 commented 5 years ago

@jedisct1, switching to OpenSSL should be easy, cause it's in Debian's package repositories. Given your reputation in the crypto domain, I'm for it ;)

Trojan295 commented 5 years ago

By switching to OpenSSL the image size dropped to 77MB :)