diff --git a/src/site-type/Site_HTML_Docker.php b/src/site-type/Site_HTML_Docker.php
index cc476335..fed0275e 100644
--- a/src/site-type/Site_HTML_Docker.php
+++ b/src/site-type/Site_HTML_Docker.php
@@ -24,6 +24,7 @@ public function generate_docker_compose_yml( array $filters = [], $volumes ) {
// nginx configuration.
$nginx['service_name'] = [ 'name' => 'nginx' ];
+ $nginx['container_name'] = $filters['site_prefix'] . '_nginx_1';
$nginx['image'] = [ 'name' => 'easyengine/nginx:' . $img_versions['easyengine/nginx'] ];
$nginx['restart'] = $restart_default;
diff --git a/templates/docker-compose.mustache b/templates/docker-compose.mustache
index 7e8f1cd2..e9911fb1 100644
--- a/templates/docker-compose.mustache
+++ b/templates/docker-compose.mustache
@@ -6,6 +6,9 @@ services:
{{#service_name}}
{{name}}:
{{/service_name}}
+ {{#container_name}}
+ container_name: {{container_name}}
+ {{/container_name}}
{{#image}}
image: {{name}}
{{/image}}