-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker.php
676 lines (616 loc) · 29.8 KB
/
docker.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
<?php $servname = $_SERVER['SERVER_NAME']; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Web Interface - Docker</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500&display=swap" rel="stylesheet">
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet">
<style>
/* The Modal (background) */
.modal,
.modal1,
.modal2 {
display: none;
position: fixed;
z-index: 1;
padding-top: 60%;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
}
.modal3,
.modal4,
.modal5 {
display: none;
position: fixed;
z-index: 1;
padding-top: 80%;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
}
/* Modal Content */
.modal-content,
.modal-content1,
.modal-content2,
.modal-content3,
.modal-content4,
.modal-content5 {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #888;
width: 80%;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}
@-webkit-keyframes animatetop {
from {
top: -300px;
opacity: 0
}
to {
top: 0;
opacity: 1
}
}
@keyframes animatetop {
from {
top: -300px;
opacity: 0
}
to {
top: 0;
opacity: 1
}
}
/* The Close Button */
.close,
.close1,
.close2,
.close3,
.close4,
.close5 {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.close2:hover,
.close2:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.close1:hover,
.close1:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.close3:hover,
.close3:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.close4:hover,
.close4:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.close5:hover,
.close5:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.modal-header,
.modal-header1,
.modal-header2,
.modal-header3,
.modal-header4,
.modal-header5 {
padding: 2px 16px;
text-align: center;
background-color: #5586ca;
color: white;
}
.modal-body,
.modal-body1,
.modal-body2,
.modal-body3,
.modal-body4,
.modal-body5 {
padding: 2px 16px;
}
.modal-footer,
.modal-footer1,
.modal-footer2,
.modal-footer3,
.modal-footer4,
.modal-footer5 {
padding: 2px 16px;
background-color: #5586ca;
color: white;
}
#btnn1,
#btnn2,
#btnn3,
#btnn4,
#btnn5,
#btnn6,
#btnn7,
#btnn8,
#btnn9,
#btnn10,
#btnn11,
#btnn12 {
margin-left: 45%;
}
</style>
</head>
<script>
function digital(cmd, p, b1, b2) {
document.getElementById(p).innerHTML = "Output is Coming, Please Wait...";
document.getElementById(b1).style.display = "none";
document.getElementById(b2).style.display = "block";
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://<?=$servname; ?>/cmd.php?x=" + cmd, true);
document.getElementById(p).innerHTML = "Output is Coming, Please Wait...";
xhr.send();
xhr.onload = function() {
var output = xhr.responseText;
document.getElementById(p).innerHTML = output;
}
}
function digital_show(p, b1, b2) {
document.getElementById(p).innerHTML = "Click on the button to get the output ...";
document.getElementById(b1).style.display = "none";
document.getElementById(b2).style.display = "block";
}
function digital_one(cmd, name, h, b1, b2, p) {
var xhr = new XMLHttpRequest();
document.getElementById(p).innerHTML = "Output is Coming, Please Wait...";
document.getElementById(h).style.display = "none";
document.getElementById(b1).style.display = "none";
document.getElementById(b2).style.display = "block";
var y = document.getElementById(name).value;
document.getElementById(name).style.display = "none";
xhr.open("GET", "http://<?=$servname; ?>/cmd.php?x=" + cmd + "&y=" + y, true);
xhr.send();
xhr.onload = function() {
var output = xhr.responseText;
document.getElementById(p).innerHTML = output;
}
}
function digital_one_show(h, i, p, b1, b2) {
document.getElementById(h).style.display = "block";
document.getElementById(i).style.display = "block";
document.getElementById(p).innerHTML = "";
document.getElementById(b2).style.display = "block";
document.getElementById(b1).style.display = "none";
}
function digital_two(cmd, img, ver, p, h1, h2, i1, i2, b1, b2) {
var xhr = new XMLHttpRequest();
document.getElementById(p).innerHTML = "Output is Coming, Please Wait...";
document.getElementById(h1).style.display = "none";
document.getElementById(h2).style.display = "none";
document.getElementById(i1).style.display = "none";
document.getElementById(i2).style.display = "none";
document.getElementById(b1).style.display = "none";
document.getElementById(b2).style.display = "block";
var y = document.getElementById(img).value;
var z = document.getElementById(ver).value;
xhr.open("GET", "http://<?=$servname; ?>/cmd.php?x=" + cmd + "&y=" + y + "&z=" + z, true);
xhr.send();
xhr.onload = function() {
var output = xhr.responseText;
document.getElementById(p).innerHTML = output;
}
}
function digital_two_show(p, h1, h2, i1, i2, b1, b2) {
document.getElementById(p).innerHTML = "";
document.getElementById(h1).style.display = "block";
document.getElementById(h2).style.display = "block";
document.getElementById(i1).style.display = "block";
document.getElementById(i2).style.display = "block";
document.getElementById(b1).style.display = "block";
document.getElementById(b2).style.display = "none";
}
</script>
<body>
<!-- ======= Header ======= -->
<header id="header" class="fixed-top">
<div class="container d-flex align-items-center justify-content-between">
<h1 class="logo"><a href="index.php">Web Interface - CI/CD</a></h1>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <a href="index.php" class="logo"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
<nav id="navbar" class="navbar">
<ul>
<li><a class="nav-link scrollto" href="index.php">Home</a></li>
<li><a class="nav-link scrollto active" href="docker.php">Services</a></li>
<li><a class="getstarted scrollto" href="docker.php">Get Started</a></li>
</ul>
<i class="bi bi-list mobile-nav-toggle"></i>
</nav>
<!-- .navbar -->
</div>
</header>
<!-- End Header -->
<main id="main">
<!-- ======= Services Section ======= -->
<section id="services" class="services section-bg">
<div class="container" data-aos="fade-up">
<br /><br />
<div class="section-title">
<img src="assets/img/Moby-logo.png" text-align="center">
<br /><br /><br />
<h2>Docker Sevices</h2>
<br />
<p>Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies,
and deploy it as one package.</p>
</div>
<br /><br />
<div class="row">
<div class="col-lg-4 col-md-6 d-flex align-items-stretch" data-aos="zoom-in" data-aos-delay="100">
<div class="icon-box iconbox-blue">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4>Launch a Container</h4>
<p>Launches a new Container inside the host machine</p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn">Launch</button></h4>
</div>
</div>
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>Launch a Container</h2>
</div>
<div class="modal-body">
<br /><br /><br />
<h6 id="l1">Enter Image Name: </h6>
<input type="text" class="form-control" id="name" placeholder="Image" required>
<br /><br />
<h6 id="l2">Enter Version: </h6>
<input type="text" class="form-control" id="ver" placeholder="Version" required>
<p id="p3"></p>
<button type="button" id="btnn2" class="btn btn-outline-secondary" onclick="digital_two_show('p3', 'l1', 'l2', 'name', 'ver', 'btnn1', 'btnn2');">Back</button>
<button type="button" id="btnn1" class="btn btn-outline-secondary" onclick="digital_two('run', 'name', 'ver', 'p3', 'l1', 'l2', 'name', 'ver', 'btnn1', 'btnn2')">Submit</button>
<br /><br /><br />
</div>
<div class="modal-footer">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal = document.getElementById("myModal");
var btn = document.getElementById("myBtn");
document.getElementById("btnn2").style.display = "none";
var span = document.getElementsByClassName("close")[0];
btn.onclick = function() {
modal.style.display = "block";
}
span.onclick = function() {
modal.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4 mt-md-0" data-aos="zoom-in" data-aos-delay="200">
<div class="icon-box iconbox-orange ">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4>Remove a Container</h4>
<p>Remove Containers: Remove one or more containers</p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn1">Remove Container</button></h4>
</div>
</div>
<!-- The Modal -->
<div id="myModal1" class="modal1">
<!-- Modal content -->
<div class="modal-content1">
<div class="modal-header1">
<span class="close1">×</span>
<h2>Remove Containers</h2>
</div>
<div class="modal-body1">
<br /><br />
<h6 id="l3">Enter Container ID / Name : </h6>
<input type="text" class="form-control" id="rem" placeholder="Container Name/ID" required>
<p id="p4"></p>
<br />
<button type="button" id="btnn4" class="btn btn-outline-secondary" onclick="digital_one('rem', 'rem','l3', 'btnn4', 'btnn3', 'p4');">Submit</button>
<br />
<button type="button" id="btnn3" class="btn btn-outline-secondary" onclick="digital_one_show('l3', 'rem', 'p4', 'btnn3', 'btnn4');">Back</button>
<br /><br />
</div>
<div class="modal-footer1">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal1 = document.getElementById("myModal1");
var btn1 = document.getElementById("myBtn1");
document.getElementById("btnn3").style.display = "none";
var span1 = document.getElementsByClassName("close1")[0];
btn1.onclick = function() {
modal1.style.display = "block";
}
span1.onclick = function() {
modal1.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal1) {
modal1.style.display = "none";
}
}
</script>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4 mt-lg-0" data-aos="zoom-in" data-aos-delay="300">
<div class="icon-box iconbox-pink">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4><a href="">Remove Image</a></h4>
<p>Remove Image: Removes (and un-tags) one or more images from the host node.</p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn2">Remove Images</button></h4>
</div>
</div>
<!-- The Modal -->
<div id="myModal2" class="modal2">
<!-- Modal content -->
<div class="modal-content2">
<div class="modal-header2">
<span class="close2">×</span>
<h2>Remove Images</h2>
</div>
<div class="modal-body2">
<br /><br />
<h6 id="l4">Enter Image ID / Name : </h6>
<input type="text" class="form-control" id="remi" placeholder="Image Name" required>
<p id="p5"></p>
<br />
<button type="button" id="btnn6" class="btn btn-outline-secondary" onclick="digital_one('remi', 'remi','l4', 'btnn6', 'btnn5', 'p5');">Submit</button>
<br />
<button type="button" id="btnn5" class="btn btn-outline-secondary" onclick="digital_one_show('l4', 'remi', 'p5', 'btnn5', 'btnn6');">Back</button>
<br /><br />
</div>
<div class="modal-footer2">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal2 = document.getElementById("myModal2");
var btn2 = document.getElementById("myBtn2");
document.getElementById("btnn5").style.display = "none";
var span2 = document.getElementsByClassName("close2")[0];
btn2.onclick = function() {
modal2.style.display = "block";
}
span2.onclick = function() {
modal2.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal2) {
modal2.style.display = "none";
}
}
</script>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4" data-aos="zoom-in" data-aos-delay="100">
<div class="icon-box iconbox-yellow">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4><a href="">Docker Execute</a></h4>
<p>Docker Execute: Runs a new command in a running container.</p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn3">Docker Execute</button></h4>
</div>
</div>
<!-- The Modal -->
<div id="myModal3" class="modal3">
<!-- Modal content -->
<div class="modal-content3">
<div class="modal-header3">
<span class="close3">×</span>
<h2>Docker Execute</h3>
</div>
<div class="modal-body3">
<br /><br /><br />
<h6 id="l5">Enter Container ID / Name: </h6>
<input type="text" class="form-control" id="cid" placeholder="Container ID" required>
<br /><br />
<h6 id="l6">Enter Command: </h6>
<input type="text" class="form-control" id="command" placeholder="Command" required>
<p id="p6"></p>
<button type="button" id="btnn8" class="btn btn-outline-secondary" onclick="digital_two_show('p6', 'l5', 'l6', 'cid', 'command', 'btnn7', 'btnn8');">Back</button>
<button type="button" id="btnn7" class="btn btn-outline-secondary" onclick="digital_two('exec', 'cid', 'command', 'p6', 'l5', 'l6', 'cid', 'command', 'btnn7', 'btnn8')">Execute</button>
<br /><br /><br />
</div>
<div class="modal-footer3">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal3 = document.getElementById("myModal3");
var btn3 = document.getElementById("myBtn3");
document.getElementById("btnn8").style.display = "none";
var span3 = document.getElementsByClassName("close3")[0];
btn3.onclick = function() {
modal3.style.display = "block";
}
span3.onclick = function() {
modal3.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal3) {
modal3.style.display = "none";
}
}
</script>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4" data-aos="zoom-in" data-aos-delay="200">
<div class="icon-box iconbox-red">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4>Docker Images</h4>
<p>List All Docker Images present inside the machine</p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn4">Docker Images</button></h4>
</div>
</div>
<div id="myModal4" class="modal4">
<!-- Modal content -->
<div class="modal-content4">
<div class="modal-header4">
<span class="close4">×</span>
<h2>Docker Images</h3>
</div>
<div class="modal-body4">
<br />
<p id="p7">Click on the button to get the output</p>
<br /><br />
<button type="button" id="btnn9" class="btn btn-outline-secondary" onclick="digital('images', 'p7', 'btnn9', 'btnn10');">Docker Images</button>
<button type="button" id="btnn10" class="btn btn-outline-secondary" onclick="digital_show('p7', 'btnn10', 'btnn9');">Back</button>
<br /><br />
</div>
<div class="modal-footer4">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal4 = document.getElementById("myModal4");
var btn4 = document.getElementById("myBtn4");
document.getElementById("btnn10").style.display = "none";
var span4 = document.getElementsByClassName("close4")[0];
btn4.onclick = function() {
modal4.style.display = "block";
}
span4.onclick = function() {
modal4.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal4) {
modal4.style.display = "none";
}
}
</script>
<div class="col-lg-4 col-md-6 d-flex align-items-stretch mt-4" data-aos="zoom-in" data-aos-delay="300">
<div class="icon-box iconbox-teal">
<div class="icon">
<img src="assets/img/resize_64.png">
</div>
<h4>Show Running Containers</h4>
<p>List all Docker Running Containers running inside the machine </p>
<br />
<h4><button type="button" class="btn btn-outline-secondary" id="myBtn5">Docker Process</button></h4>
</div>
</div>
<div id="myModal5" class="modal5">
<!-- Modal content -->
<div class="modal-content5">
<div class="modal-header5">
<span class="close5">×</span>
<h2>Running Containers</h3>
</div>
<div class="modal-body5">
<br />
<p id="p8">Click on the button to get the output</p>
<button type="button" id="btnn11" class="btn btn-outline-secondary" onclick="digital('list', 'p8', 'btnn11', 'btnn12');">Docker Process</button>
<button type="button" id="btnn12" class="btn btn-outline-secondary" onclick="digital_show('p8', 'btnn12', 'btnn11');">Back</button>
</div>
<br /><br />
<div class="modal-footer5">
<h3> </h3>
</div>
</div>
</div>
<script>
var modal5 = document.getElementById("myModal5");
var btn5 = document.getElementById("myBtn5");
document.getElementById("btnn12").style.display = "none";
var span5 = document.getElementsByClassName("close5")[0];
btn5.onclick = function() {
modal5.style.display = "block";
}
span5.onclick = function() {
modal5.style.display = "none";
}
window.onclick = function(event) {
if (event.target == modal5) {
modal5.style.display = "none";
}
}
</script>
</div>
</div>
</section>
</main>
<!-- End #main -->
<div id="preloader"></div>
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/aos/aos.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<script src="assets/vendor/purecounter/purecounter.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
</body>
</html>