Docker Project - CameronProvost/Tech-Journal GitHub Wiki
This is the steps I used to creacte and deploy a nginx webserver via docker for my docker project.
Steps: Enter the following commands:
$ mkdir docker-nginx-demo
$ cd docker-nginx-demo
$ touch docker-compose.yaml
$ mkdir src
$ echo "SYS265 Cameron's Docker nginx Page" > src/index.html
$ vim docker-compose.yaml
Enter the following into the file:
version: "3"
services: client: image: nginx ports: - 8000:80 volumes: - ./src:/usr/share/nginx/html
Finally start the new server via the following command:
$ docker-compose up --detach
The server is now up and running and can be navigated to through a browser. In my case the screenshot below shows the web page via WKS01's browser.
Steps are from the guide linked below: https://dev.to/aminnairi/quick-web-server-with-nginx-on-docker-compose-43ol