docker - Docker容器未保存状态

标签 docker server export jira state

As I can't upvote the solution myself, thank you snahor for pointing it out! When one can read..
The Dockerfile clearly states you have to persist a volume on your local machine.
As a sidenote for future encounters with this problem. There are known issues with Docker for Windows and Volumes. Setting it all up from a Linux Shell will sidestep those. (at least it did for me)



当我试图使测试框架的多个部分更可移植时,其中一部分恰巧正在访问Jira,因此我在Jira Container中遇到以下问题:

我最终使用了来自Dockerhub cptactionhanks Jira的图像,它的工作原理很像魅力。
我尝试使用我们的框架访问服务器,该框架也起作用,然后尝试保存容器。

当我对容器中的.tar文件进行exportcommit(或图像中的save)并尝试随后运行该图像时,我总是最终回到服务器配置中,而当我对原始容器进行stop/start时,服务器已启动并正在运行。
我有点茫然,为什么它不让我在这里保存状态?

编辑:由于问题似乎不清楚这里我做了什么(分别这些)
像这样启动图像:
docker run --detach --publish 8080:8080 cptactionhank/atlassian-jira:latest

在浏览器中的http://localhost:8080上访问jira并设置服务器。
尝试保存状态:
docker commit [containerID] commited_img
docker export -o exported_img.tar [containerID]
docker save -o saved_img.tar [imageID]

尝试访问状态:
docker run --publish 8080:8080 commited_img
docker import exported_img.tar jira_exp_img    //running the img afterwards
docker load -i saved_img.tar                  //running the img afterwards

在表中留下咬痕,因为它拒绝一次又一次地保存状态

如果这很明显,请允许我提前道歉,因为我使用了将近2天的Docker ..

随机的沉思:
我用自己的标准数据库设置了服务器,这在启动时是否有冲突?

最佳答案

您是否尝试过使用docker save而不是exportcommit
它应该创建一个.tar文件,可以使用docker load导入

关于docker - Docker容器未保存状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52836446/

相关文章:

swift - 需要帮助使用 AVAssetExportSession 导出音频

docker - 多次 docker 插入后清理

docker exec 命令未在 sh 文件中执行

javascript 未加载到 HTML 文件中 - nodejs + http

android - 将大数据从服务器发送到移动应用程序的最佳实践

linux - numproc 受限服务器上的 Glassfish

python - 用于非 Web 应用程序的 Python 工作流和 Docker + IDE

docker - Dockerfile ARG变量

php - 使用 php 将 20k 或更多记录从 MY SQL 导出到 CSV

javascript - 无法追踪可能的导入/导出错误 - React/ES6 模块