~\Desktop\php_test
❯ ls
Directory: C:\Users\Vabka\Desktop\php_test
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 23.06.2023 16:21 102 cli.php
-a--- 23.06.2023 16:22 80 Dockerfile
~\Desktop\php_test
❯ bat cli.php
FROM php:7.2-cli
COPY cli.php /cli.php
RUN chmod +x /cli.php
CMD php /cli.php
~\Desktop\php_test
❯ bat Dockerfile
<?php
$n = $i = 5;
while ($i--) {
echo str_repeat(' ', $i).str_repeat('* ', $n - $i)."\n";
}
~\Desktop\php_test
❯ docker build --tag 'php_test' . && docker run php_test
[+] Building 0.8s (8/8) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 31B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/php:7.2-cli 0.7s
=> [internal] load build context 0.0s
=> => transferring context: 28B 0.0s
=> [1/3] FROM docker.io/library/php:7.2-cli@sha256:42ffbc0798e4449bbd1e14fc4dcb87774aa1ad1900a09ef6a965bc0880aa2161 0.0s
=> CACHED [2/3] COPY cli.php /cli.php 0.0s
=> CACHED [3/3] RUN chmod +x /cli.php 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:105f69a23072c3f9df4d7cec0090e0652057ea9aa48b01fad36c1c57fbb4ec2b 0.0s
=> => naming to docker.io/library/php_test 0.0s
*
* *
* * *
* * * *
* * * * *
Т.е. критерии такие:
-быстрый поиск;
-просмотр;
-редактирование;
-адекватная работа с ресурсами компа;
-бесплатный;