问题描述
我是新来的码头工程师,目前正在努力解决以下问题:在码头终端启动命令后:
OAUTH_CLIENT_ID =< ...> OAUTH_CLIENT_SECRET = LT; ...>
OAUTH_URL_CALLBACK = http://192.168.99.100/api/v1/auth/login docker-compose -
文件test / docker-compose.yml up
我收到以下错误消息:
错误:for platform无法启动服务平台:无效的头字段
值oci运行时错误:container_linux.go:247:启动容器进程
导致\process_linux.go:359:容器初始化导致\\\ \\\rootfs_linux.go:53:
安装\\\\\\\/ c / users / m_konk01 / documents / GitHub / o2r-
平台/测试/nginx.conf\\\\\\到rootfs
\\\\\\\/ mnt / sda1 / var / lib / docker / aufs / mnt / 29c14c514916cf09070c6dd084bee55fa899d9
79b3f7b9521f1ab25e3a8232a0\\\\\\\在
\\\\\\\\/ mnt / sda1 / var / lib / docker / aufs / mnt / 29c14c514916cf09070c6dd084bee55fa899d9
79b3f7b9521f1ab2 5e3a8232a0 / etc / nginx / nginx.conf\\\\\\\引起\\\\\\\不是
a目录\\ \\\\\\\\\\\\\
[31mERROR [0m:在启动项目时遇到错误。
docker-compose.yml启动几个docker容器,并包含以下平台设置:
平台:
图片:nginx:最新
depends_on:
- container1
- container2
- container3
- container4
卷:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ../client :/ etc / nginx / html
ports:
- 80:80
Docker版本
$ docker版本
客户端:
版本:1.12.3
API版本:1.24
Go版本:go1.6.3
Git提交:6b644ec
内置:Wed Oct 26 23:26:11 2016
操作系统/ Arch:windows / amd64
服务器:
版本:1.12.3
API版本:1.24
转到版本:go1.6.3
Git提交:6b644ec
内置: Wed Oct 26 23:26:11 2016
操作系统/ Arch:linux / amd64
对任何想法感到高兴到目前为止,我的搜索不成功。
看起来像是要将文件装载到文件中。我记得你的码头版本是不允许的。你必须在你的Dockerfile里面移动你的nginx.conf $ /
Dockerfile:
....
添加nginx.conf / tmp /
RUN mv /tmp/nginx.conf /etc/nginx/nginx.conf&&& \
....
这应该适合你。如果没有显示您的下一个错误代码
I am new to docker and currently struggling with the following problem:
After starting the command in the docker terminal:
OAUTH_CLIENT_ID=<...> OAUTH_CLIENT_SECRET=<...>
OAUTH_URL_CALLBACK=http://192.168.99.100/api/v1/auth/login docker-compose --
file test/docker-compose.yml up
I get the following error message:
ERROR: for platform Cannot start service platform: invalid header field
value "oci runtime error: container_linux.go:247: starting container process
caused \"process_linux.go:359: container init caused \\\"rootfs_linux.go:53:
mounting \\\\\\\"/c/users/m_konk01/documents/GitHub/o2r-
platform/test/nginx.conf\\\\\\\" to rootfs
\\\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/29c14c514916cf09070c6dd084bee55fa899d9
79b3f7b9521f1ab25e3a8232a0\\\\\\\" at
\\\\\\\"/mnt/sda1/var/lib/docker/aufs/mnt/29c14c514916cf09070c6dd084bee55fa899d9
79b3f7b9521f1ab25e3a8232a0/etc/nginx/nginx.conf\\\\\\\" caused \\\\\\\"not
a directory\\\\\\\"\\\"\"\n" [31mERROR[0m: Encountered errors while bringing up the project.
The docker-compose.yml starts several docker containers and contains the following platform settings:
platform:
image: nginx:latest
depends_on:
- container1
- container2
- container3
- container4
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf:ro"
- "../client:/etc/nginx/html"
ports:
- "80:80"
Docker version
$ docker version
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: linux/amd64
Would be happy for any ideas. My search was not successful so far.
it seems like you want to mount a file to a file. i remember on your docker-version its not allowed. you have to move your nginx.conf inside of your Dockerfile
Dockerfile:
....
ADD nginx.conf /tmp/
RUN mv /tmp/nginx.conf /etc/nginx/nginx.conf && \
....
this should work for you. if not show me your next error code
这篇关于Oci运行时错误docker-compose不是一个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!