wymillerlinux / DockerDemoPHP

Docker Demo for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DockerDemoPHP

This is a Docker Demo for a PHP image on Docker Hub. Feel free to follow along.

Installation

Please note these installation instructions are for Ubuntu Linux 16.04 or higher. Email me if you have a different distribution or operating system.

First, you have to install git.
sudo apt install git

Also, you have to have Docker.
snap install docker
sudo apt install docker.io

Next, build the image with Docker.
docker build -t demo01 .

You call your Docker image however you like by replacing demo01 with anything.
If you get a permission denied error, add your user to the Docker group.
sudo usermod -aG docker wyatt
Replace wyatt with your user.

Running

Finally, run your image with port 80 exposed.
docker run -p 80:80 demo01

Open your browser and navigate to localhost. You should see a webpage. Congratulations! You have built a Docker image and ran a Docker container!

To close or shutdown your container, invoke Control+C.

Troubleshooting

Email me with the locally downloaded repo and we'll have a disscusion.

About

Docker Demo for PHP

License:MIT License


Languages

Language:Dockerfile 36.9%Language:PHP 32.8%Language:CSS 22.0%Language:JavaScript 8.3%