-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
|