hugo gogo 9dffefff0c modified nginx default conf file
+ added openssl in nginx site conf file
+ reorganized readme
2022-08-31 18:04:05 +02:00
2022-08-27 15:15:32 +02:00
2022-08-31 18:04:05 +02:00
2022-08-27 15:15:32 +02:00
2022-08-31 18:04:05 +02:00

inception


git next commit

  • in makefile added -d to up in detach
  • in makefile added close-nginx
  • in makefile changed clean doesnt rm-images

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 ?

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 :

docker pid 1

install and use docker and compose

  • how to install docker engine
  • github releases
  • install last version of compose manually
  • install manually SO discussion
  • correct release version name for download with a 'v'
  • the version installed with apt is 1.17.1, way out of date
  • remove old versions
    • sudo apt remove docker docker-engine docker.io containerd runc
  • preparing directory
    • sudo apt update
    • sudo apt install ca-certificates curl gnupg lsb-release
    • sudo mkdir -p /etc/apt/keyrings
    • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    • echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  • installing docker engine
    • sudo apt update
    • sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
  • check if installation worked
    • sudo docker run hello-world
  • installing docker compose checked version on github release, see above

nginx

openssl

Description
No description provided
Readme 2.9 MiB
Languages
Dockerfile 62.6%
Makefile 20.3%
Shell 15.4%
Assembly 1.6%
HTML 0.1%