$ docker-compose
bash: docker-compose: command not found
$ docker compose
Usage: docker compose [OPTIONS] COMMAND
...https://docs.docker.com/compose/releases/migrate/#what-are-t...
From host to container:
docker cp ./local/file.txt container:/app/
It's cruel to use the word container in a "cheatsheet" when it's actually a placeholder. Using ${container_id_or_name}:/app would make it more obvious and would actually error out if the user attempts to copy-pasteIn the spirit of being helpful, this is also good fun (but I think it does require a copy of /bin/tar in the image):
tar -cf - my-dir my/file.txt | docker cp - ${container_id}:/my/dest/
---the "-e" also has two different syntaxes, depending on if one needs to rename the variable as it goes into the container:
export AWS_ACCESS_KEY_ID
docker run -e AWS_ACCESS_KEY_ID my.image
# versus
docker run -e AWS_KEY=$AWS_ACCESS_KEY_ID my.image
zenethian•6mo ago
thrown-0825•6mo ago