Docker Container
Creating a Docker File
Create a Html file
echo "Hello World" > index.html
Create a Dockerfile
touch Dockerfile
Edit the Dockerfile
FROM nginx
COPY index.html /usr/share/nginx.html
Start docker & Build docker image from Dockerfile
sudo service docker start
docker build -t <folder-name> .
List docker images
docker images
Run docker container from the image
docker run -p 8080:80 <image-name>
Access the app
http://localhost:8080
Last updated
Was this helpful?