-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. add tgtd to image 2. add modprobe Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
- Loading branch information
1 parent
15e6952
commit 5e89a86
Showing
6 changed files
with
59 additions
and
4 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
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 |
---|---|---|
@@ -1,9 +1,23 @@ | ||
FROM opencurvedocker/curve-base:debian9 | ||
COPY --from=opencurvedocker/curve-base:curve-tgt-debian9 /curve-tgt/ /curve-tgt/ | ||
COPY --from=opencurvedocker/curve-base:curve-tgt-debian9 /curve/curve-sdk /curve-tgt/curve-sdk | ||
RUN apt update \ | ||
&& apt install -y kmod \ | ||
&& cd /curve-tgt/curve-sdk \ | ||
&& cp -f lib/* /usr/lib \ | ||
&& cp -f bin/* /usr/bin \ | ||
&& mkdir -p /usr/curvefs \ | ||
&& cp -f curvefs/* /usr/curvefs \ | ||
&& cp -f include/* /usr/include \ | ||
&& ldconfig \ | ||
&& cd /curve-tgt/ \ | ||
&& make install-programs \ | ||
&& rm -rf /curve-tgt | ||
COPY entrypoint.sh / | ||
COPY curvebs /curvebs | ||
RUN mkdir -p /etc/curve /etc/nebd /curve/init.d/ \ | ||
&& chmod a+x /entrypoint.sh \ | ||
&& cp curvebs/nbd/sbin/curve-nbd /usr/bin/ \ | ||
&& cp curvebs/tools/sbin/curve_ops_tool /usr/bin/ \ | ||
&& cp curvebs/tools-v2/sbin/curve /usr/bin/ | ||
&& cp /curvebs/nbd/sbin/curve-nbd /usr/bin/ \ | ||
&& cp /curvebs/tools/sbin/curve_ops_tool /usr/bin/ \ | ||
&& cp /curvebs/tools-v2/sbin/curve /usr/bin/ | ||
ENTRYPOINT ["/entrypoint.sh"] |
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
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,31 @@ | ||
FROM opencurvedocker/curve-base:build-debian9 AS curve-sdk | ||
ENV GITHUB_PROXY=https://ghproxy.com/ | ||
RUN git clone ${GITHUB_PROXY}https://github.com/opencurve/curve \ | ||
&& cd /curve \ | ||
&& bash replace-curve-repo.sh \ | ||
&& make dep stor=fs \ | ||
&& bash mk-tar.sh \ | ||
&& mv curve_*.tar.gz curve_sdk.tar.gz | ||
|
||
FROM opencurvedocker/curve-base:build-debian9 AS curve-tgt | ||
ENV GITHUB_PROXY=https://ghproxy.com/ | ||
COPY --from=curve-sdk /curve/curve_sdk.tar.gz / | ||
RUN tar -zxvf curve_sdk.tar.gz \ | ||
&& rm curve_sdk.tar.gz \ | ||
&& cd /curve/curve-sdk \ | ||
&& cp -f lib/* /usr/lib \ | ||
&& cp -f bin/* /usr/bin \ | ||
&& mkdir -p /usr/curvefs \ | ||
&& cp -f curvefs/* /usr/curvefs \ | ||
&& cp -f include/* /usr/include \ | ||
&& ldconfig \ | ||
&& apt update \ | ||
&& apt install -y devscripts \ | ||
librdmacm-dev \ | ||
libibverbs-dev \ | ||
xsltproc \ | ||
docbook-xsl \ | ||
&& cd / \ | ||
&& git clone --branch curve ${GITHUB_PROXY}https://github.com/opencurve/curve-tgt \ | ||
&& cd curve-tgt \ | ||
&& make programs |
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,4 @@ | ||
.PHONY: build | ||
|
||
build: | ||
docker build --target curve-tgt -t opencurvedocker/curve-base:curve-tgt-debian9 . |
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