docker组合oci运行时错误,$ PATH中找不到可执行文件 [英] docker compose oci runtime error, executable file not found in $PATH

查看:807
本文介绍了docker组合oci运行时错误,$ PATH中找不到可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注这篇文章:

http://eric-price.net/blog/centralized-logging-docker-aws-弹性搜索

这是我的docker-compose.yml是什么样子:

This is what my docker-compose.yml looks like :

version: "2"

services:

  fluentd:
    image: fluent/fluentd:latest
    ports:
      - "24224:24224"
    command: start.sh
    networks:
      - lognet

  nginx:
    image: nginx-pixel
    ports:
      - "80:80"
    logging:
      driver: fluentd
    networks:
      - lognet

networks:
  lognet:
    driver: bridge

我的 start.sh 与yml文件在同一个目录中。当我运行 docker-compos up -d 这是我得到的:

my start.sh is in the same directory as the yml file. When I run docker-compose up -d this is what I get :

错误:for fluentd无法启动服务fluentd:oci运行时错误:exec:start.sh:$ PATH
中找不到可执行文件错误:在启动项目时遇到错误。

我的docker-compose信息:

My docker-compose info:

docker-compose version 1.8.0, build f3628c7
docker-py version: 1.9.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013


推荐答案

该命令在容器内执行 - 您正在使用一个没有开始的拉动流畅的容器。 sh文件。你可以

The command is executed inside the container- you are using a pulled fluentd container which does not have your start.sh file in it. You can either

A。绑定到容器中

#docker-compose.yml
  fluentd:
    image: fluent/fluentd:latest
    volumes:
      - ./start.sh:/start.sh
    command: /start.sh

或B.将其构建到图像中

or B. build it into the image

# Dockerfile
FROM fluent/fluentd:latest
COPY start.sh /start.sh

#docker-compose.yml
  fluentd:
    build: .

这篇关于docker组合oci运行时错误,$ PATH中找不到可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆