diff --git a/bootstrap/helpers/docker.php b/bootstrap/helpers/docker.php
index 05fef91f5..03c4b3376 100644
--- a/bootstrap/helpers/docker.php
+++ b/bootstrap/helpers/docker.php
@@ -582,7 +582,6 @@ function generateLabelsApplication(Application $application, ?ApplicationPreview
if ($pull_request_id !== 0) {
$appUuid = $appUuid.'-pr-'.$pull_request_id;
}
- ray($application);
$labels = collect([]);
if ($pull_request_id === 0) {
if ($application->fqdn) {
@@ -762,6 +761,7 @@ function convertDockerRunToCompose(?string $custom_docker_run_options = null)
'--ip' => 'ip',
'--shm-size' => 'shm_size',
'--gpus' => 'gpus',
+ '--hostname' => 'hostname',
]);
foreach ($matches as $match) {
$option = $match[1];
@@ -808,7 +808,7 @@ function convertDockerRunToCompose(?string $custom_docker_run_options = null)
}
});
$compose_options->put($mapping[$option], $ulimits);
- } elseif ($option === '--shm-size') {
+ } elseif ($option === '--shm-size' || $option === '--hostname') {
if (! is_null($value) && is_array($value) && count($value) > 0) {
$compose_options->put($mapping[$option], $value[0]);
}
@@ -847,7 +847,6 @@ function convertDockerRunToCompose(?string $custom_docker_run_options = null)
continue;
}
- $compose_options->forget($option);
}
}
diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php
index b6047d4be..994d95bb8 100644
--- a/resources/views/livewire/project/application/general.blade.php
+++ b/resources/views/livewire/project/application/general.blade.php
@@ -181,7 +181,7 @@
@if ($application->build_pack === 'dockerimage')
@else
@if ($application->could_set_build_commands())
@@ -274,7 +274,7 @@
@endif
@if ($application->build_pack !== 'dockercompose')
diff --git a/tests/Feature/DockerCustomCommandsTest.php b/tests/Feature/DockerCustomCommandsTest.php
index a07372069..e2e2cee05 100644
--- a/tests/Feature/DockerCustomCommandsTest.php
+++ b/tests/Feature/DockerCustomCommandsTest.php
@@ -1,10 +1,11 @@
toBe([
'cap_add' => ['NET_ADMIN', 'NET_RAW', 'SYS_ADMIN'],
+ 'hostname' => 'test',
]);
});