remove docker images
How to remove docker images: https://linuxhint.com/removing_docker_images/
LIst image:
docker image ls
Remove image by id:
docker image rm 4bb46517cac3
How to remove docker images: https://linuxhint.com/removing_docker_images/
LIst image:
docker image ls
Remove image by id:
docker image rm 4bb46517cac3
Dockerfile
###########################################
FROM php:5.4-apache
RUN a2enmod rewrite
RUN docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo_mysql
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN apt-get update && apt-get upgrade -y
RUN echo “file_uploads = On\n” \
“memory_limit = 1000M\n” \
“upload_max_filesize = 1000M\n” \
“post_max_size = 1000M\n” \
“max_execution_time = 9000\n” \
> /usr/local/etc/php/conf.d/uploads.ini
CMD [“apachectl”, “-D”, “FOREGROUND”]
EXPOSE 80
###########################################
docker-compose.yml
###########################################
version: “3.8”
services:
web:
build:
context: .
dockerfile: Dockerfile
#image: “php:5.4-apache”
container_name: test_phpserver
restart: ‘always’
volumes:
– .:/var/www/html
ports:
– ’80:80′
###########################################
test.php
?php
echo “hello world”;
##############
Browser:
http://localhost/test.php
Containerize This! How to use PHP, Apache, MySQL within Docker containers: https://www.cloudreach.com/en/technical-blog/containerize-this-how-to-use-php-apache-mysql-within-docker-containers/
Import of DB with PHPMyAdmin not working: https://github.com/10up/wp-local-docker-v2/issues/40
Quickstart: Compose and WordPress: