cytopia / devilbox

A modern Docker LAMP stack and MEAN stack for local development
http://devilbox.org
MIT License
4.4k stars 654 forks source link

Getting http: invalid Host header while running shell.sh #1003

Open sachyya opened 1 year ago

sachyya commented 1 year ago

Have you already checked elsewhere?

What are you struggling with?

After I up the containers and try to login into php shell using shell.sh, I get http: invalid Host header

What have you tried already?

I have updated the docker containers with update-docker.sh.. Looked into logs but no issue. Have verified my /etc/hosts file.

What is your goal?

I want to be able to get access to the container's shell.

jareckik1 commented 1 year ago

Yeah, i got this message when i try to run shell.sh

jareckik1 commented 1 year ago

You can access to shell by typing in terminal: docker exec -it <container_number> /bin/bash

sachyya commented 1 year ago

I tried that one too since shell.sh has the same command and I get the same error.

romanovj commented 1 year ago

info https://github.com/moby/moby/issues/46614#issuecomment-1757751921

you can fast fix it by editing daemon.json, replace unix:///var/run/docker.sock with localhost

start containers with

sudo docker -H localhost:2375

like

sudo docker -H localhost:2375 run -it debian

you can also delete hosts from daemon.json and start docker daemon with

sudo dockerd -H localhost:2375

2375 - standart docker port

jareckik1 commented 10 months ago

Ok, I was able to fix the problem. Just had to uninstall docker, next install docker-desktop and thats all...