commit
ca6543a919
@ -340,17 +340,22 @@ function convert_docker_run_to_compose(?string $custom_docker_run_options = null
|
||||
'--cap-drop' => 'cap_drop',
|
||||
'--security-opt' => 'security_opt',
|
||||
'--sysctl' => 'sysctls',
|
||||
'--device' => 'devices',
|
||||
'--ulimit' => 'ulimits',
|
||||
'--device' => 'devices',
|
||||
'--init' => 'init',
|
||||
'--ulimit' => 'ulimits',
|
||||
'--privileged' => 'privileged',
|
||||
]);
|
||||
foreach ($matches as $match) {
|
||||
$option = $match[1];
|
||||
$value = isset($match[2]) && $match[2] !== '' ? $match[2] : true;
|
||||
$options[$option][] = $value;
|
||||
$options[$option] = array_unique($options[$option]);
|
||||
if (isset($match[2]) && $match[2] !== '') {
|
||||
$value = $match[2];
|
||||
$options[$option][] = $value;
|
||||
$options[$option] = array_unique($options[$option]);
|
||||
} else {
|
||||
$value = true;
|
||||
$options[$option] = $value;
|
||||
}
|
||||
}
|
||||
$options = collect($options);
|
||||
// Easily get mappings from https://github.com/composerize/composerize/blob/master/packages/composerize/src/mappings.js
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
|
||||
// The release version of your application
|
||||
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
|
||||
'release' => '4.0.0-beta.213',
|
||||
'release' => '4.0.0-beta.214',
|
||||
// When left empty or `null` the Laravel environment will be used
|
||||
'environment' => config('app.env'),
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
<?php
|
||||
|
||||
return '4.0.0-beta.213';
|
||||
return '4.0.0-beta.214';
|
||||
|
@ -166,12 +166,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<details class="dropdown dropdown-right" x-bind:open="open">
|
||||
<summary class="bg-transparent border-none btn hover:bg-transparent no-animation"> </summary>
|
||||
<ul tabindex="0" class="w-64 p-2 border border-coolgray-200 dropdown-content menu bg-coolgray-100 ">
|
||||
|
||||
</ul>
|
||||
</details>
|
||||
@if (isCloud() && isInstanceAdmin())
|
||||
<li title="Admin">
|
||||
<a class="hover:bg-transparent" href="/admin">
|
||||
|
@ -1,9 +1,31 @@
|
||||
<?php
|
||||
|
||||
it('ConvertDockerTunCommand', function () {
|
||||
it('ConvertCapAdd', function () {
|
||||
$input = '--cap-add=NET_ADMIN --cap-add=NET_RAW --cap-add SYS_ADMIN';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'cap_add' => ['NET_ADMIN', 'NET_RAW', 'SYS_ADMIN'],
|
||||
])->ray();
|
||||
});
|
||||
|
||||
it('ConvertPrivilegedAndInit', function () {
|
||||
$input = '---privileged --init';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'privileged' => true,
|
||||
'init' => true,
|
||||
])->ray();
|
||||
});
|
||||
|
||||
it('ConvertUlimit', function () {
|
||||
$input = '--ulimit nofile=262144:262144';
|
||||
$output = convert_docker_run_to_compose($input);
|
||||
expect($output)->toBe([
|
||||
'ulimits' => [
|
||||
'nofile' => [
|
||||
'soft' => '262144',
|
||||
'hard' => '262144',
|
||||
],
|
||||
],
|
||||
])->ray();
|
||||
});
|
||||
|
@ -4,7 +4,7 @@
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.213"
|
||||
"version": "4.0.0-beta.214"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user