1
我试图设置泊坞窗&谱写运行集成测试搬运工,撰写OCI运行时错误的可执行文件未找到(在连接容器)
我有以下泊坞窗,compose.yml
version: '3'
services:
tests:
build:
context: .
dockerfile: Dockerfile.tests
links:
- web
- maindb
web:
build:
context: .
dockerfile: Dockerfile.web
ports:
- "8080:8080"
volumes:
- .:/code
- logvolume01:/var/log
links:
- maindb
maindb:
image: postgres
environment:
POSTGRES_PASSWORD: example
volumes:
logvolume01: {}
网络容器本身的工作原理相当优良
$ docker-compose -p wh run web
Starting wh_maindb_1 ... done
2017/07/27 22:05:34 [I] http server Running on http://:8080
但是当我运行个测试容器,我得到的错误
$ docker-compose -p wh run tests
Starting wh_maindb_1 ... done
Starting 6faff07f7671_6faff07f7671_wh_web_1 ...
Starting 6faff07f7671_6faff07f7671_wh_web_1 ... error
ERROR: for 6faff07f7671_6faff07f7671_wh_web_1 Cannot start service web: oci runtime error: container_linux.go:262: starting container process caused "exec: \"web\": executable file not found in $PATH"
这里是我的Dockerfile.web
$ cat Dockerfile.web
FROM ubuntu:xenial
WORKDIR /app
ADD bin/* /app/
CMD ["/app/web"]
/应用/网络动态链接写在Golang 1.6
守护程序和一些版本信息
$ docker version
Client:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:23:31 2017
OS/Arch: linux/amd64
Server:
Version: 17.06.0-ce
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:19:04 2017
OS/Arch: linux/amd64
Experimental: false
$ docker-compose version
docker-compose version 1.14.0, build c7bdf9e
docker-py version: 2.4.2
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
这是什么输出? '泊坞窗,构成-p Wh是运行网络LS -l' – Robert
@Robert, '$码头工人,组成-p Wh是运行网络LS -l' '开始wh_maindb_1 ... done' '总21272' '-rwxrwxr-X 1根根2288256年07月24 21:19 scheduler' '-rwxrwxr-X 1根根5855104年07月24 21:19 sender' '-rwxrwxr-X 1根根13631752年07月24 21: 19 web' –
对不起。我应该要求测试:'docker-compose -p wh运行测试ls -l'。并请显示其Dockerfile – Robert