Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
Yu_MIS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yutanek
Yu_MIS
Commits
5c5403e7
Commit
5c5403e7
authored
Oct 15, 2019
by
odlai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a new func create
parent
4d19375e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
DockerController.php
app/Http/Controllers/DockerController.php
+13
-14
No files found.
app/Http/Controllers/DockerController.php
View file @
5c5403e7
...
...
@@ -12,7 +12,7 @@ class DockerController extends Controller
{
//
private
$docker_ip
=
"http://192.168.4
2
.203:2375"
;
private
$docker_ip
=
"http://192.168.4
3
.203:2375"
;
public
function
init
()
{
...
...
@@ -40,21 +40,20 @@ class DockerController extends Controller
$client
=
new
\GuzzleHttp\Client
();
$res
=
$client
->
POST
(
$this
->
docker_ip
.
"/containers/"
.
$container_id
.
"/"
.
$status
);
// $res = $client->get('http://192.168.5.194:2375/containers/json');
// $RRR=$res->getBody();
// $contents = (string) $res->getBody();
// $meta = stream_get_meta_data($RRR);
return
redirect
()
->
back
();
// $response = json_decode($res->getBody()->__toString(), true);
// echo ($response[0]['Status']);
// $results = json_decode((string)$res->getBody()->getContents(),true);
// // echo $results;
// // dd($res);
// foreach($results as $R){
// echo $R;
}
public
function
create
(
Request
$request
){
$rr
=
$request
->
input
(
'origin_stream'
);
$dd
=
$request
->
input
(
'identify_module'
);
// return($rr.$dd);
$client
=
new
\GuzzleHttp\Client
();
$res
=
$client
->
POST
(
$this
->
docker_ip
.
"/images/create?"
,[
'fromImage'
=>
'busybox'
,
'tag'
=>
'latest'
]);
$response
=
json_decode
(
$res
->
getBody
()
->
__toString
(),
true
);
return
$response
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment