Skip to content

Commit 80c1046

Browse files
authored
DOC-2894: fixed reference format while running docker image as daemon [3.6]
1 parent 2d45dea commit 80c1046

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

modules/getting-started/pages/docker.adoc

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For example, if you mount the host OS folder `~/data` to the docker folder `/hom
5959

6060
== Run TigerGraph Docker image as a daemon
6161

62-
Run the following command to pull the TigerGraph docker image, bind ports, map a shared data folder, and start a container from the image. Note: this command is very long; please make sure you copy the whole command by dragging the scroll bar to the end:
62+
Run the following command to pull the TigerGraph Docker image, bind ports, map a shared data folder, and start a container from the image:
6363

6464
[source.wrap,console]
6565
----
@@ -72,15 +72,22 @@ $ docker run -d \ <1>
7272
-v ~/data:/home/tigergraph/mydata \ <5>
7373
-t \ <6>
7474
tigergraph/tigergraph:latest <7>
75+
sudo docker run -d \ <1>
76+
-p 14022:22 \ <2>
77+
-p 9000:9000 \ <2>
78+
-p 14240:14240 \ <2>
79+
--name tigergraph \ <3>
80+
--ulimit nofile=1000000:1000000 \ <4>
81+
-v ~/data:/home/tigergraph/mydata \ <5>
82+
-t tigergraph/tigergraph:latest <6>
7583
----
7684
<1> `-d`: make the container run in the background.
7785
<2> `-p`: map docker 22 port to host OS 14022 port, 9000 port to host OS 9000 port, 14240 port to host OS 14240 port.
7886
<3> `--name`: name the container tigergraph.
7987
<4> `--ulimit`: set the `ulimit` (the number of open file descriptors per process) to 1 million.
8088
<5> `-v`: mount the host OS `~/data` folder to the docker `/home/tigergraph/mydata` folder using the -v option. If you are using Windows, change the above ~/data to something using Windows file system convention.
8189
For example, `c:\data`
82-
<6> `-t`: allocate a pseudo terminal.
83-
<7> `tigergraph/tigergraph:latest`: download the latest docker image from the TigerGraph docker registry URL tigergraph/tigergraph.
90+
<6> `tigergraph/tigergraph:latest`: download the latest docker image from the TigerGraph docker registry URL tigergraph/tigergraph.
8491

8592
[NOTE]
8693
====
@@ -90,11 +97,23 @@ For example, if you want to get the 3.0.5 version, the URL should be:
9097
`tigergraph/tigergraph:3.0.5`
9198
====
9299

93-
If you use Windows and have write permission issues with the above command, try the following command instead (this command does not map the shared folder on your host machine to your container) :
100+
In Linux shells, a *backslash (\)* lets you split a long command across multiple lines. Our examples use it for readability. If you do the same, make sure the backslash is the very last character on the line with no space after it, or the command will fail with an *invalid reference format* error.
101+
If you see a permission denied error like:
102+
103+
[source.wrap,console]
104+
----
105+
docker: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Head "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
106+
----
107+
108+
Run the command with `sudo` (as shown above), or configure your system so your user can run Docker without `sudo`.
109+
110+
If you are on Windows and encounter file permission issues, you can run the command without mounting the shared folder:
94111

95112
[source.wrap,console]
96113
----
97-
$ docker run -d -p 14022:22 -p 9000:9000 -p 14240:14240 --name tigergraph --ulimit nofile=1000000:1000000 -t tigergraph/tigergraph:latest
114+
sudo docker run -d -p 14022:22 -p 9000:9000 -p 14240:14240 \
115+
--name tigergraph --ulimit nofile=1000000:1000000 \
116+
-t tigergraph/tigergraph:latest
98117
----
99118

100119
== Connect to your container (via SSH or `docker exec`)

0 commit comments

Comments
 (0)