草庐IT

run_flow

全部标签

python - docker -py : Accessing output of python script run in ENTRYPOINT command

我在使用Python中的docker-py模块获取在docker容器中运行的Python脚本的输出时遇到问题。首先,一些背景:我已经创建了一个Dockerfile并通过命令行(dockerbuild-tmyimage/path/to/dockerfile)以正常方式构建了我的图像(id为84730be6107f)。Python脚本作为Dockerfile中的ENTRYPOINT命令执行:ENTRYPOINT["python","/cont_dirpath/script.py"]包含脚本的目录在运行时被添加(绑定(bind))到容器中。当我通过常用的docker命令行(在Ubuntu中)

linux - Docker RUN groupadd && useradd 指令无效

我已经使用Dockerfile构建了我的Dockernginx“基础”镜像,其片段如下:FROMubuntu:14.04MAINTAINERMeRUNapt-getupdate&&apt-getinstall-ysupervisorADDsupervisord.conf/etc/supervisor/conf.d/RUNapt-getinstall-ynginx..此图像随后与数据库容器和数据量相关联。后来,我想向容器中添加一个用户,以便我可以以该用户身份运行应用程序,因此我向Dockerfile添加了“RUNgroupadd-rluqo33&&useradd-r-gluqo33luq

配置 : error: cannot run C compiled programs

我正在尝试使用DebianWheezyOS在我的RaspberryPi上安装不同的软件。当我运行尝试配置我正在尝试安装的软件时,我得到了这个输出checkingforCcompilerdefaultoutputfilename...a.outcheckingforsuffixofexecutables...checkingwhetherwearecrosscompiling...configure:error:in'directoryofwhereI'minstallingthesoftware'configure:error:cannotrunCcompiledprograms.If

来自 pid 文件/var/run/mysqld/mysqld.pid 的 mysqld_safe mysqld 防止服务器重启

我在CentOS上的mySQL服务器一直运行正常,但是,我今天突然无法重启mysqld。1)#/etc/rc.d/init.d/mysqld启动显示[失败]2)查看日志tail/var/log/mysqld.log..mysqld_safemysqldfrompidfile/var/run/mysqld/mysqld.pidended3)手动放置/usr/bin/mysqld_safe15112915:54:36mysqld_safeLoggingto'/var/log/mysqld.log'.15112915:54:37mysqld_safeStartingmysqlddaemonw

linux - 为什么在 docker 容器内运行的命令不能通过 docker run 从外部运行?

当我运行dockerrun-i-tmy_container时,我有一个名为my_container的容器,然后我可以运行npm--version并且我获取2.7.4。但是,当我尝试使用dockerrun--workdir=/home/ubuntu/wwwmy_containernpm--version从容器外部运行相同的命令时,我收到一条错误消息:Unabletolocatenpm.lxc-start:Thecontainerfailedtostart.lxcstart:Additionalinformationcanbeobtainedbysettingthe--logfileand

linux - 语音识别 : jack server is not running

我正在使用speechRecognitionpython库设置声音识别器。到目前为止,这是我的代码:#!/usr/bin/envpython3importspeech_recognitionassrr=sr.Recognizer('es-MX')withsr.Microphone()asmic:audio=r.listen(mic)print(r.recognize(audio))运行我得到ALSAlibpcm_dsnoop.c:618:(snd_pcm_dsnoop_open)unabletoopenslaveALSAlibpcm_dmix.c:1022:(snd_pcm_dmix_

c++ - LeakSanitizer : get run time leak reports?

我继承了一些遗留代码,似乎某处有内存泄漏。我的第一直觉是用编译-faddress=sanitize-fno-omit-frame-pointer让AddressSanitizer的工具系列帮我找到漏洞。然而,我非常失望。我希望出现某种运行时错误消息(类似于地址清理程序在您不应该读取或写入内存时的错误)。在程序成功完成之前,泄漏sanitizer似乎不会进行任何泄漏检查分析。我的问题是我继承的代码有多个线程,它并不是为了将所有线程都加入到软着陆准备中而设计的。我用一个简单的例子简化了我的问题:#include#include#includeboolexit_thread=false;vo

linux - IBM Swift 沙盒 : Running NSURLSession: Error running code: unknown error code 132

我正在尝试执行以下脚本:importFoundationclassTestURLSession{varsession:NSURLSession!funcrun(){session=NSURLSession.sharedSession()leturl=NSURL(string:"http://www.veenex.de/tmp/json")letrequest=NSMutableURLRequest(URL:url!)request.setValue("application/json;charset=utf-8",forHTTPHeaderField:"Content-Type")re

ruby-on-rails - 延迟作业错误 : there is already one or more instance(s) of the program running

一些背景故事:我的服务器昨晚用完了磁盘空间,而delayed_job工作人员正在处理图像处理作业。当我试图停止工作时,我收到“已终止”的响应。RAILS_ENV=productionscript/delayed_jobstopTerminated然后我运行以下命令以查看工作人员是否已终止。ps-ef|grepdelayed_jobservername44744274002:37pts/100:00:00grep--color=autodelayed_job现在我尝试启动新的worker。RAILS_ENV=productionscript/delayed_job-n2startERRO

linux - 动态获取由 docker run 命令创建的正在运行的容器 ID/名称

所以我正在尝试运行以下shell脚本,它需要容器的容器ID/名称(脚本将在其中运行)动态。一种方法可能是执行dockerps然后获取容器ID,但这不是动态的。那么有没有办法动态地做到这一点?#!/bin/bashdockerexec/bin/bash-c"useradd-m-p" 最佳答案 您可以在运行时使用--name选项为您的容器指定一个特定的名称。dockerrun--namemycontainer...那么你的exec命令就可以使用指定的名称了:dockerexec-itmycontainer...