lwc:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
lwc:docker [2022/11/04 14:41] John Harrisonlwc:docker [2026/01/24 14:34] (current) John Harrison
Line 1: Line 1:
 +===== Workflow =====
 +<code>
 +# First time setup:
 +docker-compose build    # Builds your custom image from Dockerfile
 +docker-compose up -d    # Starts containers using your custom image
 +
 +# If you change the Dockerfile later:
 +docker-compose build    # Rebuild the image
 +docker-compose up -d    # Recreate containers with new image
 +
 +# Or do both at once:
 +docker-compose up -d --build
 +</code>
 +
 +===== File Operations =====
   * copy files to docker container: ''docker cp foo.txt container_id:/foo.txt''   * copy files to docker container: ''docker cp foo.txt container_id:/foo.txt''
   * copy files from docker container: ''docker cp container_id:/foot.txt foo.txt''   * copy files from docker container: ''docker cp container_id:/foot.txt foo.txt''
   * prune unneeded files (save disk space): ''sudo docker system prune -a -f''   * prune unneeded files (save disk space): ''sudo docker system prune -a -f''
  • lwc/docker.1667590876.txt.gz
  • Last modified: 2022/11/04 14:41
  • by John Harrison