我有一个dockerfile如下:
FROM python:3.7.5-alpine3.10
RUN apk update
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apk add --no-cache cython3
CMD [ "sh", "ls"]
当我进入带有docker run -it --rm mycontainer /bin/sh
cython 的容器时,似乎没有安装。我错过了什么?
/usr/src/app # which python
/usr/local/bin/python
/usr/src/app # python
Python 3.7.5 (default, Oct 21 2019, 20:13:45)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cython
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cython'