Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Docker images are missing dbm.gnu support #151

Closed
sebk-666 opened this issue Oct 20, 2016 · 2 comments
Closed

Python Docker images are missing dbm.gnu support #151

sebk-666 opened this issue Oct 20, 2016 · 2 comments

Comments

@sebk-666
Copy link

Hi,
I tested multiple of the official Python 3.x Docker images and they all are missing support for dbm.gnu.
While there is a <lib>/dbm/gnu.py file that imports _gdbm, the corresponding _gdbm.cpython.*.solibrary in <lib>/lib-dynload/ is missing.

I tested on python:3.4, python:3.5, python:3.6, python:3.4-alpine - all with the same result.

# python3
Python 3.4.5 (default, Sep 24 2016, 05:29:30)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm.gnu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dbm/gnu.py", line 3, in <module>
    from _gdbm import *
ImportError: No module named '_gdbm'

Sebastian

@yosifkit
Copy link
Member

Looks like we need libgdbm-dev and since we already are adding it to ruby images I think this makes it a candidate for addition to buildpack-deps so they can share the layer. As a bonus it won't increase the image size by much:

After this operation, 167 kB of additional disk space will be used.

We'll still need to add the appropriate packages to slim and alpine variants here, but I've started a PR to add it to buildpack-deps. docker-library/buildpack-deps#49

@tianon
Copy link
Member

tianon commented Apr 20, 2018

Appears this was resolved with docker-library/buildpack-deps#49 / #153. 🎉

$ docker pull python:3
3: Pulling from library/python
Digest: sha256:4748e00099548b67f250ee6f1210f1f5675113948ed0aae48e195ad6c8e12a32
Status: Image is up to date for python:3

$ docker run -it --rm python:3
Python 3.6.5 (default, Mar 31 2018, 01:15:58) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dbm.gnu
>>> 

@tianon tianon closed this as completed Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants