question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OS dependencies from requirements.apt during Docker development.

See original GitHub issue

Hello! As docs says when we don’t use Docker, all those requirements.apt Ubuntu 14.04 related packages are installed into activated virtualenv by executing install_os_dependencies.sh script. But I can’t figure out what about docker-compose approach? When we start compose services during local development (with dev.yml) our django service uses Python 3.5 base docker image without all those OS deps. And then if we need, for example, create translations with:

docker-compose run --rm -f dev.yml django ./manage.py makemessages -l SOMELOCALE

Django cannot find gettext program installed through docker container…

Is it supposed to satisfy django-batteries os dependencies manually or I’m missing something conceptually? Maybe I’m asking a dumb question… but could you clarify it for me, please.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
pydannycommented, Oct 29, 2016

@Braintelligence, please don’t hijack this issue with a completely separate issue. If you have a distinct problem, please open a new issue.

2reactions
jayfkcommented, Jan 13, 2016

No, that’s not a dumb question.

gettext is not in the official python image, but you can install it by adding

RUN apt-get update && apt-get install -y gettext

to Dockerfile-dev and Dockerfile.

Make sure to rebuild your containers by running docker-compose -f dev.yml build after that.

I’m not quite sure if we want to have gettext installed by default in docker. When looking at the dependencies, there are some x11 related packages as dependencies I’m not really happy about running in a container.

Is gettext only needed to run the makemessage command? If so, we could add a one-off command to the documentation that runs gettext with /app and the python runtime mounted in the container.

cc @burhan

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker development best practices - Docker Documentation
Docker development best practices. The following development patterns have proven to be helpful for people building applications with Docker.
Read more >
Reproducible work environments using Docker - Thoughtworks
Docker allows us to manage the following dependencies in a single place: OS dependencies; CLI tools dependencies; Python dependencies. By ...
Read more >
How to avoid reinstalling packages when building Docker ...
Try to build a Dockerfile which looks something like this: FROM my/base WORKDIR /srv ADD ./requirements.txt /srv/requirements.txt RUN pip install -r ...
Read more >
We reduced our Docker images by 60% with –no-install ...
To avoid the installation of recommended packages, we included the flag --no-install-recommends when using APT in our Dockerfile.
Read more >
Docker Best Practices for Python Developers - TestDriven.io
In summary, multi-stage builds can decrease the size of your production images, helping you save time and money. In addition, this will simplify ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found