$ docker-compose -f [docker-compose.yml] --rm [service-name] [comand] $ docker-compose of docker-compose.yml --rm python pip install -r requirements.txt
`–rm`で使い捨てコンテナができる。
使い捨てと言いながら、volumesで永続化したりしてるんだけど。。。
Script Scripts管理者
docker-compose run
Estimated reading time: 2 minutes Usage: run [options] [-v VOLUME…] [-p PORT…] [-e KEY=VAL…] [-l KEY=VALUE…] SERVICE [COMMAND] [ARGS…] Options: -d, –detach Detached mode: Run container in the background, print new container name. –name NAME Assign a name to the container –entrypoint CMD Override the entrypoint of the image.
$ docker-compose -f [docker-compose.yml] --rm [service-name] [comand] $ docker-compose of docker-compose.yml --rm python pip install -r requirements.txt
`–rm`で使い捨てコンテナができる。
使い捨てと言いながら、volumesで永続化したりしてるんだけど。。。