我的requirement中是有Django,Scrapy等库,所以在执行
RUN pip install -r requirements.txt之前要先执行
RUN apk add --no-cache --update python3-dev gcc build-base RUN apk add --no-cache libffi-dev RUN apk add --no-cache openssl-dev RUN apk add --no-cache gcc musl-dev libxslt-dev
这样就能避免出现gcc错误了