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
Table of contents 1. Bootstrap5 breakpoints 1.1 M...
Recently, some friends said that after installing...
<div id="root"> <h2>Keep go...
Related articles: Beginners learn some HTML tags ...
A colleague asked for help: the login to the back...
Preface In actual business, paging is a common bu...
Table of contents 1 Promise Interrupt the call ch...
Table of contents vue - Use swiper plugin to impl...
What are the benefits of learning HTML? 1: Easily...
Master-slave synchronization, also called master-...
<br />Original: http://uicom.net/blog/?p=762...
This article shares the specific code for the WeC...
Demand scenario: The existing PXC environment has...
Preface In the development of actual projects, we...
In the following example, when the width of the td...