{"repo":"spatie/docker","free":true,"listed":false,"github":"https://github.com/spatie/docker","clone":"git clone https://github.com/spatie/docker.git","description":"Manage docker containers with PHP","language":"PHP","stars":485,"topics":["docker","php"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Manage docker containers with PHP This package provides a nice way to start docker containers and execute commands on them. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: Usage You can get an instance of a docker container using By default the container will be daemonized and it will be cleaned up after it exists. Customizing the docker container Prevent daemonization If you don't want your docker being daemonized, call doNotDaemonize . Prevent automatic clean up If you don't want your docker being cleaned up after it exists, call doNotCleanUpAfterExit . Priviliged If you want your docker being privileged, call privileged . Custom shell If the bash shell is not available in your docker image, you can specify an alternative shell. Custom docker binary If the docker binary is not globally available, you can specify the exact path. Naming the container You can name the container by passing the name as the second argument to the constructor. Alternatively, use the name method. Mapping ports You can map ports between the host machine and the docker container using the mapPort method. To map multiple ports, ju","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/docker/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}