Quote:
Originally Posted by PJo336
Do you run docker commands locally like docker-compose run app npm test, or whatever, or do you go into a terminal inside the container to do everything? I find the lag annoyingly slow between running a docker command and getting it to execute, otherwise i would use it for everything
docker-compose run would spin up a container from scratch and then run your thing - that's going to be slow, yeah. I generally do docker-compose up to get whatever containers I want going up, and then "docker run" to run something inside the containers. If I want to do something more interactive then I run "docker run IMAGENAME bash". For stuff I do fairly often I have a bunch of bash aliases.
The other major use case is that I started distributing tools via docker containers. I can't link to any of our stuff because you need to be docker-logined to our artifactory, but as an example
docker run --rm=true eclecticiq/cabby:latest taxii-discovery --path
https://otx.alienvault.com/taxii/discovery
This will run "cabby" from a docker image. Yes, you can pip install cabby and then run it, but the chance of it working first time from docker is basically 100%, and the chance of it working universally as a python package is high, but maybe only 80% - competing package versions, maybe needing to set up a virtualenv, issues installing or not having root permission to install packages, etc. It's guaranteed not to cause any problems or clashes pretty much.