Dockerfile
FROM php:7.2-apache
docker-compose.yml
version: '3' services: web: build: . volumes: - ./src/:/var/www/html/ ports: - 80:80 - 443:443
.htaccess
AuthUserFile /var/www/html/.htpasswd AuthName "Please enter your ID and password" AuthType Basic require valid-user