When you run docker exec-it container name bash, the following line displays root@number: /var/www/html#.I want "$" to start the next line.

Asked 2 years ago, Updated 2 years ago, 59 views


Among Docer 2 that you can see in manga,
After running $docker exec-it myapp bash,
Run $echo'<?php phpinfo();'>index.php and run
In your browser, it says http://localhost/" to confirm that php is working

I am using Docker Quickstart Terminal.
$docker exec-it myapp bash displays the following line:

root@Number: /var/www/html#

Try doing the following:

root@Number: /var/www/html#echo'<?php phpinfo();'>index.php

I tried typing http://localhost/ in my browser, but it says "I can't access this site."
You can check other sites, so it's connected to the Internet.

C:\Users\Username\Desktop\kunren\docker\wakaba
Index.php was created in the folder.

I didn't know the solution, so I asked you a question.

docker

2022-09-30 20:24

1 Answers

I was able to find the answer below.Virtual machine required port forwarding configuration.
Successfully accessed localhost.

Starting Docker in Windows 10 fails to connect to localhost - Qiita


2022-09-30 20:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.