Thursday, December 2, 2021

dockerfile basic example with apache and php php:7.4-apache

Create a docker file 

FROM php:7.4-apache

RUN echo "Building the Image"

COPY /var/www/html /var/www/html

RUN chmod -R 755 /var/www/html

EXPOSE 80


Rest of the commands

docker build ./

docker run -tid -p 8083:90 --name "work" a334445434

docker exec -it kantil bash

(exit to get out of bash)

This wont sync files dynamically into container after changes - but only onces

No comments: