- limits.h: No such file or directory
apk add gcc g++
- ffi.h: No such file or directory
apk add libffi-dev
- ERROR: The ‘make’ utility is missing from PATH
apk add make
- This package requires Rust >=1.41.0.
apk add rust
- error: [Errno 2] No such file or directory: ‘cargo’
apk add cargo
- openssl/opensslv.h: No such file or directory
apk add openssl-dev
以某个python项目为例,Dockerfile编写完成后的样例文件:
FROM python:3.8.6-alpine3.12
MAINTAINER loca1h0st<chenjh.network@gmail.com>
ENV TIMEZONE Asia/Shanghai
COPY . /var/www
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk update && apk add gcc g++ make libffi-dev rust cargo openssl-dev && \
echo ${TIMEZONE} > /etc/timezone && \
pip install -r /var/www/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN ["/bin/sh", "-c", "python /var/www/run.py"]
Python项目信息:
发表回复