TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Docker and Python

12 pointsby jajjaraxover 4 years ago

4 comments

jamemuracaover 4 years ago
Nice one! Consider a follow up article with 1. Alpine Linux as the base image to significantly reduce the size and 2. Build the requirements in one layer, and then transfer the codebase to a new layer to further reduce size.
66antigravityover 4 years ago
First of all, I would rather use docker-compose, not a single docker build, since your app can grow. Speaking of growing, I would separate dev &amp; prod docker-compose.<p>&gt; When we develop more than one python project, we need to configure our development environment with the dependencies of all the projects.<p>use pyenv and simple virtualenvs.<p>I think you are trying to substitute a virtualenvs with a docker. Why trying to kill a sparrow with a cannon?
rwdimover 4 years ago
while i agree this is overly complex given the simplicity of virtualenvs, there is something “pythonic” about encapsulating the environment in a container.<p>I would suggest using alpine containers with python for a ~40mB container, versus the ~900MB container created here to run a server.<p>For me, python containers are only used when I want to bundle things into services on swarm, and I use venvs for local development.
MeteorMarcover 4 years ago
How is this easier than sharing a requirements.txt and a requirements-dev.txt on git and having a venv per python project?
评论 #25558148 未加载