Virtualization
Containers
Docker

Docker

Code Snippets

  • Print container ip as named:
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
  • Create Nginx server for testing:
docker run -it --rm -d -p 8080:80 --name web nginx
  • Fix docker permission issue on Ubuntu 20.04:
sudo chown $(whoami):$(whoami) /var/run/docker.sock

Links

  1. Remove unused data (opens in a new tab)
  2. https://www.ddmboss.com/2022/01/20/wordpress-docker-development-set-up-with-traefik-redis-and-nginx/ (opens in a new tab)
  3. https://computerz.solutions/docker-compose-wordpress-nginx-et-traefik/ (opens in a new tab)
  4. https://github.com/EugenMayer/docker-wordpress-boilerplate-simple (opens in a new tab)
Last updated on January 18, 2023