diff --git a/README.md b/README.md index 43c65fcedc8490ad0e9e134cc67232d3863d4cc8..8380d7bbbfb17f86f1c8ea8be442f4b370c8c2d4 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ kubernetes: 1.17.0+ 其余约束详见[约束限制](./docs/limitation.md) ### 通过yaml一键部署rubik -我们提供了一键式脚本供用户使用,并在openEuler官方镜像仓库上提供了`hub.oepkgs.net/cloudnative/rubik:latest`镜像(仅支持x86架构)。 +我们提供了一键式脚本供用户使用,并在openEuler容器镜像仓库提供了体验镜像`hub.oepkgs.net/cloudnative/rubik:latest`。 + 1. 下载rubik yaml脚本 ```bash $ curl -O https://gitee.com/openeuler/rubik/raw/master/hack/rubik-daemonset.yaml diff --git a/hack/Dockerfile.multiarch b/hack/Dockerfile.multiarch new file mode 100644 index 0000000000000000000000000000000000000000..3e1499cea2650fc1a5cd2eb32756f051fdef6125 --- /dev/null +++ b/hack/Dockerfile.multiarch @@ -0,0 +1,21 @@ +# This Dockerfile can be used for multi-arch image compiling +# pre: docker buildx is needed +# 1st: you should located at the root of rubik source repo ($GOPATH/src/isula.org/rubik) +# 2nd: run this command for amd64 and arm64 +# docker buildx build --platform=linux/amd64,linux/arm64 -f ./hack/Dockerfile.multiarch -t hub.oepkgs.net/cloudnative/rubik . --push + +## 1st stage, prepare golang image and compile rubik binary +FROM openeuler/openeuler AS build_rubik +RUN yum install -y golang make + +ENV GOPATH /go +ENV PATH $PATH:/go/bin:/usr/local/go/bin + +ADD . ${GOPATH}/src/isula.org/rubik +RUN cd ${GOPATH}/src/isula.org/rubik && make + + +## 2nd stage, copy rubik binary from 1st stage and build rubik image +FROM scratch +COPY --from=build_rubik /go/src/isula.org/rubik/build/rubik /rubik +ENTRYPOINT ["/rubik"] \ No newline at end of file