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

填坑记录 #24

Open
laozhudetui opened this issue Feb 22, 2023 · 1 comment
Open

填坑记录 #24

laozhudetui opened this issue Feb 22, 2023 · 1 comment

Comments

@laozhudetui
Copy link

laozhudetui commented Feb 22, 2023

主要原因时代久远,基础镜像分支用的lastest,导致python版本不一致,引起依赖包各种报错

1、Dockerfile
FROM alpine:3.9.4

MAINTAINER sec@zto.cn

ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV mongo_database acc
ENV mongo_host 127.0.0.1
ENV mongo_port 27017

ENV mongo_user user

ENV mongo_password 123456

ENV redis_host 127.0.0.1
ENV redis_port 6379
ENV redis_db 0

ENV redis_password 123456

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

RUN apk update && apk upgrade && apk add gcc g++ linux-headers python3 python3-dev py-pip

COPY . /opt/authcheck

WORKDIR /opt/authcheck

RUN python3 -m pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

EXPOSE 8888

CMD uwsgi uwsgi.ini

2、requirements.txt
Flask==1.0.2
requests==2.21.0
Flask-Cors==3.0.8
mongoengine==0.23.1
APScheduler==3.8.1
uWSGI==2.0.18
redis==3.2.1
tzlocal==2.1

@laozhudetui laozhudetui changed the title Dockefile 基础镜像alpine laste分支python高版本导致报错,改成3.15即可 填坑记录 Feb 22, 2023
@Blyth0He
Copy link

感谢大佬填坑

Blyth0He added a commit to Blyth0He/secscan-authcheck that referenced this issue Nov 26, 2024
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

2 participants