|
5 | 5 | exit;
|
6 | 6 | }
|
7 | 7 |
|
8 | | -$boxType = ( $e = getenv('PHP_BUILD_CONFIG') ) ? $e : 'default'; |
| 8 | +$sshPublicKey = ( $k = @file_get_contents('/var/local/id_rsa.pub') ) ? $k : NULL; |
| 9 | +$boxType = ( $e = getenv('PHP_BUILD_CONFIG') ) ? $e : 'default'; |
9 | 10 |
|
10 | 11 | $nginxVersion = str_replace('nginx/', '', $_SERVER['SERVER_SOFTWARE']);
|
11 | 12 | $phpVersion = phpversion();
|
|
34 | 35 | box-shadow: 2px 2px 8px rgba(0, 0, 0, .2);
|
35 | 36 | border-radius: 4px;
|
36 | 37 | }
|
| 38 | + |
| 39 | + pre{ |
| 40 | + word-wrap: break-word; |
| 41 | + white-space: pre-wrap; |
| 42 | + overflow: auto; |
| 43 | + padding: 10px; |
| 44 | + border: 1px solid #e3e3e3; |
| 45 | + border-radius: 5px; |
| 46 | + background: #f4f4f4; |
| 47 | + height: auto; |
| 48 | + box-shadow: inset 0px 0px 11px rgba(0, 0, 0, 0.3); |
| 49 | + } |
37 | 50 | </style>
|
38 | 51 | </head>
|
39 | 52 | <body>
|
|
49 | 62 | <p>
|
50 | 63 | <span style="color:green;">◉</span>
|
51 | 64 | PHP v<?php echo $phpVersion; ?>
|
52 | | - </p> |
| 65 | + </p> |
| 66 | + |
| 67 | + <?php if ( $sshPublicKey ): ?> |
| 68 | + <h4>SSH Public Key</h4> |
| 69 | + |
| 70 | + <pre><?php echo $sshPublicKey; ?></pre> |
| 71 | + <?php else: ?> |
| 72 | + <p> |
| 73 | + ✖ Could not retrieve ssh public key! |
| 74 | + If you want to run a customized version with a key pair, |
| 75 | + please customize your base image using template |
| 76 | + <a href="https://github.com/adrian7/docker-nginx-fpm/blob/master/custom/example/Dockerfile" target="_blank"> |
| 77 | + here |
| 78 | + </a>. |
| 79 | + </p> |
| 80 | + <p style="color: #E73A38;"> |
| 81 | + <em> |
| 82 | + ⚠ Note that, images with a key pair should not be pushed |
| 83 | + to public repositories. |
| 84 | + </em> |
| 85 | + </p> |
| 86 | + <?php endif; ?> |
53 | 87 |
|
54 | 88 | <p> </p>
|
55 | 89 | <p style="font-size: .7em; text-align: center;">
|
|
0 commit comments