Skip to content

Instantly share code, notes, and snippets.

@douglascrp
Last active October 28, 2024 13:54
Show Gist options
  • Save douglascrp/c39db4b2993bcd3e217322962412b8e2 to your computer and use it in GitHub Desktop.
Save douglascrp/c39db4b2993bcd3e217322962412b8e2 to your computer and use it in GitHub Desktop.
Some docker useful resources
Forcing the latest image's version before starting the containers
docker compose pull
Rebuilding all the containers with docker-compose
docker-compose up --build --force-recreate -d
Rebuild a single container with docker-compose
docker-compose up -d --force-recreate --no-deps --build <service_name>
Connect to container console as root
docker exec -u root -it <container_name> /bin/bash
network config
https://www.lullabot.com/articles/fixing-docker-and-vpn-ip-address-conflicts
Cleaning docker "trash"
https://lebkowski.name/docker-volumes/
Enable remote debug
Add the following property in the environments
CATALINA_OPTS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8888"
Configuring log size
/etc/docker/daemon.json
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3",
"labels": "production_status",
"env": "os,customer"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment