Files
42_INT_13_inception/README.md
2022-09-17 17:00:07 +02:00

12 KiB

inception


WIP


git next commit


questions

  • ? 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

  • sudo netstat -tulpn to print network connections and see if nginx is running
  • or : ps -ax | grep nginx
  • sudo nginx -s quit to stop it
  • sudo docker system prune -af --volumes -> -a also unused images, -f without prompt for confirmation
    • remove stopped containers
    • remove unused networks
    • remove unused images
    • remove build cache
  • sudo docker ps -q all runnings containers
  • sudo docker stop $(sudo docker ps -q) stop all runnings containers

Docker basics

  • the container posess its own filesystem
  • we need to copy the files it uses inside this filesystem
  • we can do that with COPY

build and run a docker image

  • sudo docker build --tag <name> .
  • sudo docker run <name>
  • sudo docker images to list docker images
  • sudo docker image rm <number>
  • sudo docker ps to list docker processes
  • sudo docker ps rm <name>

execute a docker-compose file

  • sudo docker-compose up
  • or sudo docker-compose -f ./path up to specify a path

ressources

docker :

nginx

openssl

mariadb

wordpress