Docker容器-即使容器中存在命令也不会执行

时间:2020-09-21 13:34:11

标签: bash docker containers exec

我有一个centos码头工人映像,我试图在容器内运行杜比数字工具“ spectrum_avg”进行分析。如果我通过以下命令登录docker容器,则执行命令可用。

docker container -exec -ti <id> /bin/bash

[test@container ~]$ spectrum_avg
Spectrum Average Tool
(C) Copyright 2011 Dolby Laboratories.
Version 2.6.2
Usage: spectrum_avg [OPTION]... WAVEFILE

-c<chan>,    selects channel in multichannel file
             0 = first channel
             -ca for all channels
-g,          create on-screen graph
-go<name>,   create a graph file (.png,.pdf,.jpg)
-m<map>,     selects channel map for input WAVEFILE
             1: L R l r C s
             2: L C R l r s
             3: L l C r R s
             4: L R C s l r
             5: L C r R l s
             6: C L R l r s
             no default
-s,          turn off stripping lead silence
-t,          send text output to standard output (default)
-to<name>,   create a text file
-xmin<lim>   selects minimum x-axis limit
-xmax<lim>   selects maximum x-axis limit
-ymin<lim>   selects minimum y-axis limit
-ymax<lim>   selects maximum y-axis limit

发出以下命令时,尽管该命令就在其中,但我找不到该命令。

[test@host Scripts]$ docker container exec container_1 bash  -c "cd /opt/SATS ; ls ; spectrum_avg"

SATS-uninstall
ThirdParty
amp_vs_time
doc
dyn_rng
freq_resp
graph_check
graph_plotter
jre
mult_freq_resp
noise_mod
pwr_vs_time
res_envelope
spectrum_NFFT
**spectrum_avg**
thd_vs_freq
thd_vs_level
**bash: spectrum_avg: command not found**

使用@user请求的数据进行编辑

docker container exec container_1 bash  -c 'cd /opt/SATS ; ls ; echo $PATH; spectrum_avg'
SATS-uninstall
ThirdParty
amp_vs_time
doc
dyn_rng
freq_resp
graph_check
graph_plotter
jre
mult_freq_resp
noise_mod
pwr_vs_time
res_envelope
spectrum_NFFT
spectrum_avg
thd_vs_freq
thd_vs_level
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
bash: spectrum_avg: command not found

0 个答案:

没有答案