To create an operating environment for php, run apache for the time being.
apt update
Update the apt package list.
Immediately after creating the container, there is nothing in the package list / var / lib / apt / lists
. Even if you do apt install xxx
, you should get the error message Unable to locate package xxx
.
Copy the package list from /etc/apt/sources.list
to / var / lib / apt / lists
with the following command.
apt update
source /etc/apache2/apache2.conf
apache2
When you access http: // localhost
from your local Chrome, you will see the following screen.
docker run -d -p 80:80 --name test ubuntu
to connect the local port 80 and the container port 80.It's something I got on my own. Not related to apache. I couldn't use vim with ubuntu made with docker, so I installed it.
apt install vim
apt install gcc make
apt install golang
apt install nginx
apt install python
apt install python3-pip
pip3 install boto3
apt install php
Recommended Posts