diff --git a/README.md b/README.md index b5c561f..969f346 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ - ? what means mounted in "a file or directory on the host machine is mounted into a container" ? - ? why the volumes cannot be modify outside docker ? +- ? `rm -rf /var/lib/apt/lists/*` ? --- ## nginx basics @@ -65,6 +66,7 @@ - [dangling images ''](https://projectatomic.io/blog/2015/07/what-are-docker-none-none-images/) - [go inside docker to debug it](https://docs.docker.com/engine/reference/commandline/container_exec/) - `docker exec -ti bash` to run bash inside a running container +- [docker CMD vs ENTRYPOINT](https://phoenixnap.com/kb/docker-cmd-vs-entrypoint) ###### docker pid 1 - nginx by default will create some child process (a master and some workers), then it quits (doc ?) @@ -128,3 +130,23 @@ - [openssl req man](https://www.openssl.org/docs/man1.0.2/man1/openssl-req.html) - [SO discussion about ssl self signed certificate and becoming a CA](https://stackoverflow.com/questions/10175812/how-to-generate-a-self-signed-ssl-certificate-using-openssl) +#### wordpress +- [install wp](https://wordpress.org/support/article/how-to-install-wordpress/#detailed-instructions) +- [install wp with wp-cli](https://make.wordpress.org/cli/handbook/how-to-install/) + + ###### install wp + - wget https://wordpress.org/latest.tar.gz + - tar -xzvf latest.tar.gz + +#### mariadb +- [mariadb tutorial](https://www.mariadbtutorial.com/) +- server vs client : + - "server" runs in the background and listen for inputs + - "client" interpret the commands to communicate with "server" +- sudo apt install mariadb-client mariadb-server +- [ERROR 1698 (28000): Access denied for user 'root'@'localhost'](https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost) +- [wiki ubuntu mariadb](https://doc.ubuntu-fr.org/mariadb) + +#### php-fpm +- [](https://en.wikipedia.org/wiki/FastCGI) + diff --git a/srcs/requirements/mariadb/Dockerfile b/srcs/requirements/mariadb/Dockerfile index e69de29..695b29d 100644 --- a/srcs/requirements/mariadb/Dockerfile +++ b/srcs/requirements/mariadb/Dockerfile @@ -0,0 +1,4 @@ +FROM debian:buster + +RUN apt update && apt install -y mariadb-client mariadb-server + diff --git a/srcs/requirements/nginx/Dockerfile b/srcs/requirements/nginx/Dockerfile index e39a80e..a0ce1b7 100644 --- a/srcs/requirements/nginx/Dockerfile +++ b/srcs/requirements/nginx/Dockerfile @@ -1,9 +1,10 @@ +#FROM alpine:3.15 FROM debian:buster RUN apt update && apt install -y nginx openssl # for debug -RUN apt install -y procps vim +#RUN apt install -y procps vim # create ssl certificate RUN openssl req -newkey rsa:2048 -nodes -x509 \ diff --git a/srcs/requirements/wordpress/Dockerfile b/srcs/requirements/wordpress/Dockerfile new file mode 100644 index 0000000..f37198b --- /dev/null +++ b/srcs/requirements/wordpress/Dockerfile @@ -0,0 +1,22 @@ +FROM debian:buster + +#RUN wget https://wordpress.org/latest.tar.gz ; tar -xzvf latest.tar.gz + +## for debug +#RUN apt install -y procps vim +# +## create ssl certificate +#RUN openssl req -newkey rsa:2048 -nodes -x509 \ +# -keyout /etc/ssl/private/hulamy.42.fr.key -out /etc/ssl/certs/hulamy.42.fr.crt \ +# -subj "/C=fr/ST=ile-de-france/L=paris/O=42/OU=inception/CN=hulamy.42.fr" +# +## import sites conf files +#COPY ./conf/nginx.conf /etc/nginx/ +#COPY ./conf/inception_nginx.conf /etc/nginx/conf.d/ +# +## for test +#COPY ./conf/index.html /data/www/ +#COPY ./conf/https/index.html /data/wwws/ +# +#CMD [ "nginx", "-g", "daemon off;" ] +