Skip to content

Commit

Permalink
add docker doc
Browse files Browse the repository at this point in the history
  • Loading branch information
beanljun committed Aug 5, 2024
1 parent 2b79901 commit 095b983
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## 1.通过项目中dockerfile文件,构建项目镜像

```bash
cd KVstorageBaseRaft-cpp/docker
docker build --network host -t kv_raft:22.04 -f build.dockerfile .
```

## 2.进入docker容器

```bash
cd KVstorageBaseRaft-cpp/docker/scripts
#启动容器
./run_docker.sh
#进入容器
./into_docker.sh
```

## 3.在docker容器内编译代码

```bash
mkdir build
cd build
cmake ..
make -j4
```

## 4.容器内启动程序

```bash
cd ../bin
./raftCoreRun -n 3 -f test.conf
```

0 comments on commit 095b983

Please sign in to comment.