如何在Windows上构建Memgraph Docker扩展?

huangapple go评论57阅读模式
英文:

How to build Memgraph Docker Extension on Windows?

问题

我通常大部分时间都在使用Mac。现在我有一台基于Windows 11的台式电脑,在上面我需要构建Memgraph Docker扩展。

出于某种原因,我无法构建它:

C:\Users\merkart\repositories> git clone https://github.com/memgraph/memgraph-docker-extension
Cloning into 'memgraph-docker-extension'...
remote: Enumerating objects: 9736, done.
remote: Counting objects: 100% (9736/9736), done.
remote: Compressing objects: 100% (6352/6352), done.
remote: Total 9736 (delta 3060), reused 9681 (delta 3028), pack-reused 0
Receiving objects: 100% (9736/9736), 25.77 MiB | 9.31 MiB/s, done.
Resolving deltas: 100% (3060/3060), done.
Updating files: 100% (10382/10382), done.

C:\Users\merkart\repositories>cd memgraph-docker-extension

C:\Users\merkart\repositories\memgraph-docker-extension> make build-extension
'make' is not recognized as an internal or external command,
operable program or batch file.

我已经尝试安装MSYS2,但构建过程也没有成功:

pacman -Syu --needed base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl

我还能尝试什么?

英文:

I usually use Mac most of the time. Now I got one Windows 11 based desktop and on it I would need to build Memgraph Docker Extension.

For some reason, I can't build it:

C:\Users\merkart\repositories> git clone https://github.com/memgraph/memgraph-docker-extension
Cloning into 'memgraph-docker-extension'...
remote: Enumerating objects: 9736, done.
remote: Counting objects: 100% (9736/9736), done.
remote: Compressing objects: 100% (6352/6352), done.
remote: Total 9736 (delta 3060), reused 9681 (delta 3028), pack-reused 0
Receiving objects: 100% (9736/9736), 25.77 MiB | 9.31 MiB/s, done.
Resolving deltas: 100% (3060/3060), done.
Updating files: 100% (10382/10382), done.

C:\Users\merkart\repositories>cd memgraph-docker-extension

C:\Users\merkart\repositories\memgraph-docker-extension> make build-extension
'make' is not recognized as an internal or external command,
operable program or batch file.

I've tried to install MSYS2, but I also had no luck with the build process.

pacman -Syu --needed base-devel git mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-openssl

What else could I try?

答案1

得分: 1

如果你没有 make/cmake,你可以使用 docker build
我看到你已经克隆了仓库

git clone https://github.com/memgraph/memgraph-docker-extension.git

所以只需进入该文件夹并运行:

docker build --tag=memgraph/memgraph-docker-extension:1.1.0 .   

构建完成后安装扩展

docker extension install memgraph/memgraph-docker-extension:1.1.0  

标签 1.1.0 对于本地构建并不重要。在构建和安装扩展时使用相同的标签是唯一重要的。

英文:

If you don't have make/cmake you can use docker build.
I see that you have cloned the repo

git clone https://github.com/memgraph/memgraph-docker-extension.git

so just go to that folder and run:

docker build --tag=memgraph/memgraph-docker-extension:1.1.0 .   

once build is done install the extension

docker extension install memgraph/memgraph-docker-extension:1.1.0  

The tag, 1.1.0, is not so important if you are doing a local build. It's only important to use the same tag both when you are building and installing extension.

huangapple
  • 本文由 发表于 2023年6月12日 16:19:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76454747.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定