Create root.txt File Inside Docker Container Using Nginx Server
Create and place a root.txt file inside the Nginx Docker container’s web root directory to make it accessible via the browser.
FROM nginx:alpine
COPY root.txt /usr/share/nginx/html/nano docker-compose.ymlversion: '3'
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "80:80"docker-compose builddocker-compose up -dLast updated