3 ms·
Using an appropriate base image (debian for dev, alpine for production). No you don't. It's nonsensical to use a "convenient" development environment, and then
by c0l0 9y ago
Using an appropriate base image (debian for dev, alpine for production).
No you don't. It's nonsensical to use a "convenient" development environment, and then make the production application work in something more bare-bones/stripped down/different. I've never used Alpine Linux, but even I know there's a LOT of subtle differences between it and Debian. Nontrivial stuff that matters, like C library implementation (GNU libc vs. musl) and init system (systemd vs. sysv init). You don't want that, because it opens up a multiverse full of potential, exclusively bad surprises that you'll be unprepared to debug.
- codegladiator 9y agoSort of defeats the whole point of single consistent environment if you are going to change the base container itself.
- Sinaptika 9y agoI agree on base image point. Although if we have python apps in the image, it should not matter (both 2-alpine3.7 and 3-alpine3.8 work ok). Systemd vs sysv is not an issue in docker containers since it's (mostly) not used. If you are using an init system, you are probably using tini (included in recent Docker) or supervisord (usually used for older/legacy c/c++ apps).
- timeu 9y agoI can attest to that. We once had the issue that a python app running through gunicorn segfaulted with alpine while it worked fine with a centos image.