Sometimes we want to execute a command in a container but don't want to enter the container. What to do then? So the script can be written like this #!/bin/bash DOCKER_ID=62f3f40ab240 sudo docker exec -it $DOCKER_ID /bin/bash -c 'cd /packages/detectron && python tools/train.py' done Supplementary knowledge: Solve the problem of seamlessly calling shell commands between Docker containers and host machines I won't say any more nonsense, let's see the solution~
(Add privilege permissions to the docker container and set pid: "host") The above article about how to execute a command in a container outside the container is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL trigger usage scenarios and method examples
>>: About VSCode formatting JS automatically adding or removing semicolons
Preface Reduce is one of the new conventional arr...
In Docker Start all container commands docker sta...
Table of contents 1. Test environment 1.1 Hardwar...
This article describes the Mysql self-join query....
Occasionally, I need to group select contents. In ...
Find the problem I wrote a simple demo before, bu...
Table of contents 1 The common rules for creating...
1. System environment The system version after yu...
Table of contents 1. We must ensure that the vue/...
Preface In most projects, you will encounter onli...
VMware vSphere is the industry's leading and ...
MyISAM, a commonly used storage engine in MySQL c...
This article example shares the specific code of ...
Set the table's style="table-layout:fixed...
Phenomenon Start the Docker container docker run ...