Re:How to Write Dockerfiles for Python Web Apps
by c0l0 on Tuesday February 27, 2018 @04:17AM
(#16472123)
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.
[ Parent
| on HN ]
Re:How to Write Dockerfiles for Python Web Apps
by codegladiator on Tuesday February 27, 2018 @04:18AM
(#16472130)
Sort of defeats the whole point of single consistent environment if you are going to change the base container itself.
Re:How to Write Dockerfiles for Python Web Apps
by Sinaptika on Tuesday February 27, 2018 @09:03AM
(#16473379)
I 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).