Docker exec失败,权限被拒绝:未知

时间:2018-09-03 17:51:32

标签: symfony docker

我是docker的新手,我只是想创建一个简单的Symfony API。我运行docker-compose up -d创建了这些容器:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div class="slidesDiv" id="cust">
  <img class="imageClass" src="https://via.placeholder.com/200x200?text=1" alt="" />
  <img class="imageClass" src="https://via.placeholder.com/200x200?text=2" alt="" />
  <img class="imageClass" src="https://via.placeholder.com/200x200?text=3" alt="" />
  <img class="imageClass" src="https://via.placeholder.com/200x200?text=4" alt="" />
  <img class="imageClass" src="https://via.placeholder.com/200x200?text=5" alt="" />
</div>

然后我从simple-api_php中获取ID并运行

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 071de3320346 willdurand/elk "/usr/bin/supervisor…" About a minute ago Up About a minute 0.0.0.0:81->80/tcp simple-api_elk_1 c24132f645be simple-api_nginx "nginx" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp simple-api_nginx_1 37128a03b667 simple-api_php "php-fpm7 -F" About a minute ago Up About a minute 0.0.0.0:9000->9000/tcp simple-api_php_1 aa7738c59891 mysql "docker-entrypoint.s…" About a minute ago Up About a minute 3306/tcp, 33060/tcp, 0.0.0.0:3307->3307/tcp simple-api_db_1

它返回:

docker exec 37128a03b667 composer create-project symfony/website-skeleton symfony-api

这是我的docker-compose.travis.yml:

OCI runtime exec failed: open /tmp/runc-process126262263: permission denied: unknown

只是没有足够的知识来解决此问题。

谢谢!

1 个答案:

答案 0 :(得分:0)

  1. 您应该编辑您的麋鹿服务。

    elk:
      image: willdurand/elk
      ports:
        - "81:80"
      volumes:
        - ./elk/logstash:/etc/logstash
        - ./elk/logstash/patterns:/opt/logstash/patterns <-------- remove this line
      volumes_from:
        - php
        - nginx <-------- remove this line
    

注意:注释用箭头<------

标记
  1. 此外,如果您仍然遇到相同的问题,请尝试删除图像和容器,然后重新构建它们。

    // This command will remove all containers and images in your docker-compose.travis.yml file
    $: docker-compose down
    
    // Or you can remove container and images manually
    $: docker rm container_name
    $: docker rmi image_name