启动时自动从文件夹安装服务

问题描述 投票:1回答:1

我目前正在使用docker运行arangodb,我希望能够通过重新启动容器来启动干净的平板电脑。

我已经在docker中安装了卷,我想要挂载我的服务代码。

如何自动让arangodb安装这些服务?我希望能够编辑卷中的代码,以便能够开发我的服务,而无需再次上传它们。同样重要的是,我可以从客户端计算机直接在已装入的卷中运行VCS。

service arangodb
1个回答
0
投票

ArangoDB容器具有脚本挂钩,可以通过将文件放在特定目录中来在派生容器中使用:

FROM arangodb/testdrivearangodocker
MAINTAINER Frank Celler <[email protected]>

COPY test.js /docker-entrypoint-initdb.d

COPY test.sh /docker-entrypoint-initdb.d

COPY dumps /docker-entrypoint-initdb.d/dumps

COPY verify.js /

作为we demonstrate in this testcontainer

  • dumps目录将使用arangorestore恢复
  • .js文件将使用arangosh执行
  • .sh文件将被执行

script mechanism is implemented in this part of the docker entrypoint script

使用ArangoDB 3.3,您可以使用旧的foxx-manager在you may use foxx-cli上安装服务ArangoDB 3.4。

© www.soinside.com 2019 - 2024. All rights reserved.