Comments (4)
麻烦发一下对Docker-common做了哪些调整哈,我们分析看看
from codeanalysis.
首先遇到的问题是用默认源的化在apt-get update会卡住 可能是网络问题,
然后我就改成了163的源,修改如下:
`FROM python:3.7.12-slim
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
RUN echo 'deb http://mirrors.163.com/debian/ stretch main non-free contrib' > /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib' >> /etc/apt/sources.list
RUN echo 'deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib' >> /etc/apt/sources.list
ARG EXTRA_TOOLS="gnupg curl wget jq vim-tiny net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client"
RUN set -ex && cd /
&& apt-get update
&& apt-get install -y --no-install-recommends $EXTRA_TOOLS
&& apt-get update
&& apt-get install -y mariadb-client
&& apt-get clean
&& echo "LC_ALL=zh_CN.UTF-8" >> /etc/environment
&& echo "zh_CN.UTF-8 UTF-8" > /etc/locale.gen
&& echo "LANG=zh_CN.UTF-8" > /etc/locale.conf
&& locale-gen
&& ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
&& rm -rf /var/cache/apt/* /root/.cache
WORKDIR /var/www/django/codedog
COPY . .
RUN mkdir -p log/ &&
pip install -U setuptools pip &&
pip install -r requirements.txt
`
再执行,apt-get update 这步没问题了
但是到apt-get install -y --no-install-recommends $EXTRA_TOOLS 这步会报依赖错误:
试了网上的一些依赖的解决方案,也不行
from codeanalysis.
因为python:3.7.12-slim
是基于debian bullseye
(debian 11)版本构建的,对应的源需要选择 bullseye
版本的源
可以将你的修改替换为以下内容:
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
echo 'deb http://mirrors.163.com/debian/ bullseye main non-free contrib' > /etc/apt/sources.list && \
echo 'deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib' >> /etc/apt/sources.list && \
echo 'deb http://mirrors.163.com/debian-security bullseye-security main non-free contrib' >> /etc/apt/sources.list
from codeanalysis.
找到原因了,找了一天,我服务器本地时间不对,导致的apt-get update错误,和apt-get的源无关。
from codeanalysis.
Related Issues (20)
- 使用Findbugs工具分析代码出现编译失败。 HOT 3
- 仓库登记时候显示错误,配置为ssh,显示自动将ssh替换为http HOT 1
- 【需求】一个小细节, jenkins插件assert .hpi文件命名带上tca信息 HOT 1
- 【BUG】安装TCA插件,配置TCA 测试任务,一触发任务jenkins就会shutdown,且所触发的构建#N在界面上会消失 HOT 3
- 【咨询】如何查看当前的扫描日志或是扫描状态 HOT 1
- 【需求】与LDAP集成
- 【需求】项目普通成员可配置是否允许标记处理 或是 提供类似read_only的角色 HOT 1
- 求一些提高服务可靠性的建议🫡
- 问下有除了腾讯csig以外用这个代码分析的用户吗? HOT 1
- 是否有Python静态代码解析结果的关系图功能,类似vs code中的“查找所有引用” HOT 1
- 基于客户端分析模式,怎么获取git代码的详情,代码库12G HOT 4
- 【需求】在标记处理问题时,能够支持填写标记的备注,方便回溯问题分析过程 HOT 1
- 圈复杂度的codefile报错,代码检测错误codefile正常 HOT 4
- 客户端扫描执行崩溃 HOT 1
- 【需求】调研集成 corax 社区版 HOT 1
- 使用findbugs时,指令gradle未找到 HOT 3
- web端部署最新资源执行 `sh build-source.sh`在windows环境下会导致configs.json路径问题
- cls生成的Server ID发生了变化 HOT 1
- 客户端本地分析失败,HTTP Error 500: Internal Server Error
- 打开问题详情复制文件名时,变成关闭 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeanalysis.