diff --git a/doc/install/docker.md b/doc/install/docker.md
index ba22c9f14592143b940f847a17b5de2126383202..c05cc44b6ded2ff7d80f4d27842db6e60fd3217d 100644
--- a/doc/install/docker.md
+++ b/doc/install/docker.md
@@ -230,7 +230,7 @@ install, and upgrade your Docker-based GitLab installation:
    services:
      gitlab:
        image: gitlab/gitlab-ee:<version>-ee.0
-       name: gitlab
+       container_name: gitlab
        restart: always
        hostname: 'gitlab.example.com'
        environment:
@@ -268,7 +268,7 @@ version: '3.6'
 services:
   gitlab:
     image: gitlab/gitlab-ee:<version>-ee.0
-    name: gitlab
+    container_name: gitlab
     restart: always
     hostname: 'gitlab.example.com'
     environment:
@@ -309,7 +309,7 @@ Here's an example that deploys GitLab with four runners as a [stack](https://doc
    services:
      gitlab:
        image: gitlab/gitlab-ee:<version>-ee.0
-       name: gitlab
+       container_name: gitlab
        restart: always
        hostname: 'gitlab.example.com'
        ports: