find_library broken in alpine image

Open
#111 18 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, python

Research direction

Start by reproducing the two commands from the issue in alpine:3.3 and python:2-alpine, then compare the image environments and Python ctypes.util.find_library behavior. Done means identifying the additional breakage in python:2-alpine and documenting or implementing a validated fix or workaround for the image.

Written by the indexing model from the issue text.

Description

question

According to http://bugs.alpinelinux.org/issues/5264 its known, that find_library is broken with python3 on Alpine.

However, with python2 it works on pure alpine:3.3,

$ docker run --rm -ti alpine:3.3 sh -c "apk add --no-cache file python && python -c 'from ctypes.util import find_library;print find_library(\"c\")'"
...
libc.musl-x86_64.so.1

but not on python:2-alpine,

$ docker run --rm -ti --entrypoint sh python:2-alpine -c "python -c 'from ctypes.util import find_library;print(find_library(\"c\"))'"
None

so python:2-alpine seems to break something in addition to the general alpine issue, which renders even version 2 broken. Maybe the find_library issue could also be worked around by python image in general.

Dominant language
Dockerfile
Stars
2.8k
Forks
1.1k
Avg merge
3d 1h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from docker-library/python

All issues in docker-library/python

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.