Docker exec fails, permission denied: unknown

Docker exec fails, permission denied: unknown



I'm new to docker and I'm just trying to create a simple Symfony API. I ran docker-compose up -d which created these containers:


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



I then took the id from the simple-api_php and ran



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


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



It returns:


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



here is my docker-compose.travis.yml:


version: '2'
services:
db:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: symfony
MYSQL_USER: symfony
MYSQL_PASSWORD: symfony
php:
build: ./php-fpm
expose:
- "9000"
volumes:
- ./symfony:/var/www/symfony
- ./logs/symfony:/var/www/symfony/var/logs
links:
- db
nginx:
build: ./nginx
ports:
- "80:80"
links:
- php
volumes_from:
- php
volumes:
- ./logs/nginx/:/var/log/nginx
elk:
image: willdurand/elk
ports:
- "81:80"
volumes:
- ./elk/logstash:/etc/logstash
- ./elk/logstash/patterns:/opt/logstash/patterns
volumes_from:
- php
- nginx



Just don't have enough knowledge to troubleshoot this.



Thanks!!





There are a lot examples (Symfony specific too) here for you: inanzzz.com/index.php/posts/docker
– BentCoder
Sep 3 '18 at 18:00





I second @BentCoder's suggestion. But, generally speaking, in case of an error, why not exec into bash and run your command? You will get a complete output...
– Jovan Perovic
Sep 3 '18 at 18:04


bash




1 Answer
1



You should edit your elk service.


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



Note: comments are marked with arrow <------



Also, if you still have the same issue - try to remove images and containers and then rebuild them.


// 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



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)