I have been currently working on Laravel application using Docker and i run this command successfully: docker-compose up -d --build
I have been trying to run this command in the Laravel Project:
docker-compose exec app composer install
And it was working fine but i don't know why this command giving me this error right now:
`Traceback (most recent call last):
File "bin/docker-compose", line 6, in <module>
File "compose/cli/main.py", line 72, in main
File "compose/cli/main.py", line 128, in perform_command
File "compose/cli/main.py", line 524, in exec_command
File "compose/cli/main.py", line 1498, in call_docker
File "subprocess.py", line 323, in call
File "subprocess.py", line 775, in __init__
File "subprocess.py", line 1433, in _execute_child
File "os.py", line 809, in fsencode
TypeError: expected str, bytes or os.PathLike object, not NoneType
[3639] Failed to execute script docker-compose`
I am new to docker and don't know how to resolve this issue. I even though have tried re-installing docker again. I have been using ubuntu 18.10.
docker --version: Docker version 19.03.5, build 633a0ea838
docker-compose --version docker-compose version 1.25.0, build 0a186604
docker-compose.yml networks: `
app-network:
driver: bridge
services:
app:
build:
context: /home/abdullah_16f8418/Documents/G-Hire
dockerfile: Dockerfile
depends_on:
- db
- laravel_echo_server
- redis
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
networks:
app-network: null
restart: unless-stopped
volumes:
- /home/abdullah_16f8418/Documents/G-Hire:/var/www/html:rw
- /home/abdullah_16f8418/Documents/G-Hire/.docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini:rw
working_dir: /var/www/html
db:
environment:
MYSQL_DATABASE: laravel
MYSQL_PASSWORD: laraveluserpass
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: laraveluser
SERVICE_NAME: mysql
SERVICE_TAGS: dev
healthcheck:
interval: 30s
retries: 5
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
timeout: 10s
image: mysql:5.7.22
networks:
app-network: null
restart: unless-stopped
volumes:
- /home/abdullah_16f8418/Documents/G-Hire/.docker/data/db:/var/lib/mysql:rw
- /home/abdullah_16f8418/Documents/G-Hire/.docker/mysql/my.cnf:/etc/mysql/my.cnf:rw
laravel_echo_server:
build:
context: /home/abdullah_16f8418/Documents/G-Hire/.docker/laravel-echo
dockerfile: echo.dockerfile
healthcheck:
interval: 30s
retries: 5
test: wget --quiet --tries=1 --spider http://localhost:6001 || exit 1z
timeout: 10s
networks:
app-network: null
restart: unless-stopped
volumes:
- /home/abdullah_16f8418/Documents/G-Hire/.env:/app/.env:rw
redis:
healthcheck:
interval: 30s
retries: 5
test:
- CMD
- redis-cli
- ping
timeout: 10s
image: redis:5-alpine
networks:
app-network: null
restart: unless-stopped
volumes:
- /home/abdullah_16f8418/Documents/G-Hire/.docker/data/redis:/data:rw
webserver:
healthcheck:
interval: 30s
retries: 5
test: wget --quiet --tries=1 --spider https://public-chat.jamesisme.com || exit
1z
timeout: 10s
image: nginx:alpine
networks:
app-network: null
ports:
- 8000:80/tcp
restart: unless-stopped
volumes:
- /home/abdullah_16f8418/Documents/G-Hire:/var/www/html:rw
- /home/abdullah_16f8418/Documents/G-Hire/.docker/nginx/conf.d:/etc/nginx/conf.d:rw
version: '3.0'
`
