mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 08:17:02 +00:00
feat: dockerfile build pack
This commit is contained in:
1 parent
82a01b4483
commit
619d395331
21 files changed
+330
-137
No files matched your search
@@ -64,3 +64,13 @@ function generate_container_name(string $uuid, int $pull_request_id = 0)
|
||||
return $uuid;
|
||||
}
|
||||
}
|
||||
function get_port_from_dockerfile($dockerfile): int
|
||||
{
|
||||
$port = preg_grep('/EXPOSE\s+(\d+)/', explode("\n", $dockerfile));
|
||||
if (count($port) > 0 && preg_match('/EXPOSE\s+(\d+)/', $port[1], $matches)) {
|
||||
$port = $matches[1];
|
||||
} else {
|
||||
$port = 80;
|
||||
}
|
||||
return $port;
|
||||
}
|
||||
Reference in new issue
Block a user