File tree Expand file tree Collapse file tree 4 files changed +15
-10
lines changed
Expand file tree Collapse file tree 4 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 55A PHP library for the Docker Engine API
66
77* [ 问题反馈] ( https://github.com/khs1994-docker/lnmp/issues/332 )
8-
98* [ Docker API Docs] ( https://docs.docker.com/engine/api/v1.37/ )
10-
119* [ Docs] ( https://khs1994-docker.github.io/libdocker/ )
1210
11+ ## 微信订阅号
12+
13+ <p align =" center " >
14+ <img width =" 200 " src =" https://user-images.githubusercontent.com/16733187/46847944-84a96b80-ce19-11e8-9f0c-ec84b2ac463e.jpg " >
15+ </p >
16+
17+ <p align =" center " ><strong >关注项目作者微信订阅号,接收项目最新动态</strong ></p >
18+
1319## Installation
1420
1521To Use Docker PHP Library, simply:
@@ -70,7 +76,7 @@ var_dump($docker_container->logs($container_id));
7076$ php artisan vendor:publish --tag=config
7177```
7278
73- Then edit ` config/docker.php `
79+ Then edit config file ` config/docker.php `
7480
7581``` php
7682use Docker;
@@ -86,12 +92,12 @@ docker()->container()->list();
8692class MyController
8793{
8894 public $docker;
89-
95+
9096 public function __construct(\Docker\Docker $docker)
9197 {
9298 $this->docker = $docker;
9399 }
94-
100+
95101 public function demo()
96102 {
97103 $this->docker->container()->list();
Original file line number Diff line number Diff line change @@ -23,6 +23,6 @@ class Facade extends \Illuminate\Support\Facades\Facade
2323{
2424 protected static function getFacadeAccessor ()
2525 {
26- return \ Docker \Docker::class ;
26+ return ' docker ' ;
2727 }
2828}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function register(): void
2828
2929 $ this ->mergeConfigFrom ($ configPath , 'docker ' );
3030
31- $ this ->app ->singleton (Docker::class , function () {
31+ $ this ->app ->singleton (' docker ' , function () {
3232 $ app_name = config ('docker.default ' );
3333
3434 return Docker::docker (Docker::createOptionArray (
@@ -42,7 +42,7 @@ public function register(): void
4242 ));
4343 });
4444
45- $ this ->app ->alias (Docker::class, ' docker ' );
45+ $ this ->app ->alias (' docker ' , Docker::class);
4646 }
4747
4848 /**
@@ -52,6 +52,6 @@ public function register(): void
5252 */
5353 public function provides ()
5454 {
55- return [Docker::class ];
55+ return [' docker ' ];
5656 }
5757}
Original file line number Diff line number Diff line change @@ -18,5 +18,4 @@ function docker()
1818
1919class Docker extends \Docker \Kernel \Facade
2020{
21-
2221}
You can’t perform that action at this time.
0 commit comments