jjzjj

Requirements

全部标签

docker - 在构建阶段将环境变量从 docker-compose 传递到容器

我正在尝试使用单个Dockerfile、几个docker-compose文件和几个envoronment_variables文件为多个环境创建配置。我需要它为每个环境使用具有python依赖项的不同文件。假设我们在两个环境中创建了一个web服务:development和production。为此,我创建了以下文件结构:docker-compose-dev.ymldocker-compose-prod.ymlenvs/dev.envprod.envweb/Dockerfilerequirements_dev.txtrequirements_prod.txt目标是在容器的build过程中在

python - 如何使用 pip 安装本地软件包作为 docker 构建的一部分?

我有一个包,我想将它构建到一个依赖于我系统上相邻包的docker镜像中。我的requirements.txt看起来像这样:-e../other_modulenumpy==1.0.0flask==0.12.5当我在virtualenv中调用pipinstall-rrequirements.txt时,效果很好。但是,如果我在Dockerfile中调用它,例如:ADDrequirements.txt/appRUNpipinstall-rrequirements.txt并使用dockerbuild运行。我收到一条错误消息:../other_module应该是本地项目的路径或以svn+、git+

python - 如何使用 pip 安装本地软件包作为 docker 构建的一部分?

我有一个包,我想将它构建到一个依赖于我系统上相邻包的docker镜像中。我的requirements.txt看起来像这样:-e../other_modulenumpy==1.0.0flask==0.12.5当我在virtualenv中调用pipinstall-rrequirements.txt时,效果很好。但是,如果我在Dockerfile中调用它,例如:ADDrequirements.txt/appRUNpipinstall-rrequirements.txt并使用dockerbuild运行。我收到一条错误消息:../other_module应该是本地项目的路径或以svn+、git+

python - 使用 python 3.5 安装 cPickle

这可能很愚蠢,但我无法使用python3.5dockerimage安装cPickleDockerfileFROMpython:3.5-onbuildrequirements.txtcpickle当我尝试构建图像时$dockerbuild-tsample.SendingbuildcontexttoDockerdaemon3.072kBStep1:FROMpython:3.5-onbuild#Executing3buildtriggers...Step1:COPYrequirements.txt/usr/src/app/Step1:RUNpipinstall--no-cache-dir-r

python - 使用 python 3.5 安装 cPickle

这可能很愚蠢,但我无法使用python3.5dockerimage安装cPickleDockerfileFROMpython:3.5-onbuildrequirements.txtcpickle当我尝试构建图像时$dockerbuild-tsample.SendingbuildcontexttoDockerdaemon3.072kBStep1:FROMpython:3.5-onbuild#Executing3buildtriggers...Step1:COPYrequirements.txt/usr/src/app/Step1:RUNpipinstall--no-cache-dir-r

go - 无法更新包(转到 : error loading module requirements)

我想更新我的包,但是当我运行-v命令以获取最新更新时,命令行出现错误goget-v./...会发生什么?>go:findinggithub.com/aws/aws-sdk-gov1.17.11go:finding>github.com/aws/aws-sdk-gov1.17.7go:finding>github.com/aws/aws-sdk-gov1.16.32go:>github.com/aws/aws-sdk-go@v1.17.7:git-cprotocol.version=0fetch>--unshallow-fhttps://github.com/aws/aws-sdk-go

转到 Dockerfile 的 requirements.txt

我需要为我的项目编写一个Dockerfile,该项目需要大量goget到外部包。有没有办法获得要导入的外部包列表?我想知道我需要放入Dockerfile中的每个外部包。 最佳答案 您可以使用项目cespare/deplist或检查thisthread使用golist.golist-f'{{.ImportPath}}'P/...|xargs-n1deplist|grep-vP|sort-uwithPbeingthepartialpackagepath. 关于转到Dockerfile的req

python - Docker如何仅在发生更改时运行pip requirements.txt?

在Dockerfile中,我有一个安装requirements.txt的层:FROMpython:2.7RUNpipinstall-rrequirements.txt当我构建docker镜像时,它会运行整个过程不管对此文件所做的任何更改。如果文件发生更改,我如何确保Docker仅运行pipinstall-rrequirements.txt?Removingintermediatecontainerf98c845d0f05Step3:RUNpipinstall-rrequirements.txt--->Runningin8ceb63abaef6Collectinghttps://gith

python - Docker如何仅在发生更改时运行pip requirements.txt?

在Dockerfile中,我有一个安装requirements.txt的层:FROMpython:2.7RUNpipinstall-rrequirements.txt当我构建docker镜像时,它会运行整个过程不管对此文件所做的任何更改。如果文件发生更改,我如何确保Docker仅运行pipinstall-rrequirements.txt?Removingintermediatecontainerf98c845d0f05Step3:RUNpipinstall-rrequirements.txt--->Runningin8ceb63abaef6Collectinghttps://gith

python - 在 Pycharm 上通过 docker-compose 运行 Python 控制台

我在通过docker-compose使用远程python解释器运行pycharm时遇到一些问题。一切都很好,除了Python控制台,当我按下运行按钮时,它只显示以下消息:"Error:Unabletolocatecontainernameforservice"web"fromdocker-composeoutput"我真的不明白为什么我的docker-compose.yml提供了web服务。有什么帮助吗?编辑:docker-compose.ymlversion:'2'volumes:dados:driver:localmedia:driver:localstatic:driver:lo