From 7eb391faa77d79b321df6667fbff6c1ffc07fe8d Mon Sep 17 00:00:00 2001
From: wo_cow <niuqianqian@huawei.com>
Date: Wed, 23 Nov 2022 16:56:58 +0800
Subject: [PATCH] fix the problem that the gopher in docker doesn't support tc
 command and docker command

---
 README.md                         | 2 +-
 build/Dockerfile_2003_sp1_aarch64 | 2 ++
 build/Dockerfile_2003_sp1_x86_64  | 2 ++
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/README.md b/README.md
index fd00153..efcea94 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ gala-gopher集成了常用的native探针以及知名中间件探针；gala-goph
   最后按照如下示例命令启动容器：
 
   ```shell
-  docker run -d --name xxx -p 8888:8888 --privileged -v /etc/machine-id:/etc/machine-id -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /boot:/boot:ro -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /root/gopher_user_conf:/gala-gopher/user_conf/ -v /etc/localtime:/etc/localtime:ro --pid=host gala-gopher:0.0.1
+  docker run -d --name xxx -p 8888:8888 --privileged -v /etc/machine-id:/etc/machine-id -v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /boot:/boot:ro -v /sys/kernel/debug:/sys/kernel/debug -v /sys/fs/bpf:/sys/fs/bpf -v /root/gopher_user_conf:/gala-gopher/user_conf/ -v /etc/localtime:/etc/localtime:ro -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/overlay2:/var/lib/docker/overlay2 --pid=host gala-gopher:0.0.1
   ```
 
   成功启动容器后，通过docker ps可以看到正在运行的容器：
diff --git a/build/Dockerfile_2003_sp1_aarch64 b/build/Dockerfile_2003_sp1_aarch64
index 36f378a..176987d 100644
--- a/build/Dockerfile_2003_sp1_aarch64
+++ b/build/Dockerfile_2003_sp1_aarch64
@@ -40,6 +40,8 @@ RUN yum update -y \
     && yum install -y libbpf-0.3-1.h0.oe1.aarch64.rpm \
     && yum install -y libbpf-devel-0.3-1.h0.oe1.aarch64.rpm \
     && yum install -y kmod \
+    && yum install -y docker \
+    && yum install -y iproute \
     && yum install -y gala-gopher-v1.1.0-52.aarch64.rpm
 
 # expose port
diff --git a/build/Dockerfile_2003_sp1_x86_64 b/build/Dockerfile_2003_sp1_x86_64
index bde0b73..31f1ced 100644
--- a/build/Dockerfile_2003_sp1_x86_64
+++ b/build/Dockerfile_2003_sp1_x86_64
@@ -40,6 +40,8 @@ RUN yum update -y \
     && yum install -y libbpf-0.3-1.h0.oe1.x86_64.rpm \
     && yum install -y libbpf-devel-0.3-1.h0.oe1.x86_64.rpm \
     && yum install -y kmod \
+    && yum install -y docker \
+    && yum install -y iproute \
     && yum install -y gala-gopher-v1.1.0-52.x86_64.rpm
 
 # expose port
-- 
2.28.0.windows.1

