I'm new to Docker and just made my first steps. I wanted to play a little bit with docker and was about configuring a Dockerfile for yii:
FROM php:7.2.3-apache
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer
RUN apt-get update && apt-get install -y git unzip zip
EXPOSE 8080
RUN composer create-project --prefer-dist yiisoft/yii2-app-basic test
Then I run the container with:
docker container run -d --name test -p 8080:8080 test-yii
When I go to localhost:8080
i got an ERR_EMPTY_RESPONSE
.
This is the network result of docker container inspect
:
"Ports": {
"80/tcp": null,
"8080/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8080"
}
]
},
I appreciate every hint that helps me to solve this issue!
Edit: I forgot to mention that i connect to the container and then run php yii serve
to test if Yii runs and this results in the above described problem.