Docker容器中的H2 DB [英] H2 DB in docker container

查看:552
本文介绍了Docker容器中的H2 DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在alpine docker容器中运行一个非常基本的spring boot应用程序,该容器在AWS上的内存H2数据库中.不幸的是,未设置webAllowOthers,所以我无法访问H2控制台.

I am running a very basic spring boot app in an alpine docker container with in memory H2 database on AWS. Unfortunately, webAllowOthers is not set, so i cannot access the H2 console.

有什么方法可以访问数据库中的数据?

Is there any way to access the data in the db?

我可以进入容器,但是我不知道如何继续.

I can sh into the container, but i dont know how to continue.

推荐答案

此答案:

https://stackoverflow.com/a/49741935/4280315

...问题"无法查看h2数据库Web控制台以及如何更改默认h2端口" ,可能会有所帮助.

... to the question "not able to view h2 database web console and how to change the default h2 port", may help.

它与我在远程服务器上的spring-boot应用程序一起工作.不过,我未使用Docker .

It worked for me with my spring-boot application in a remote server. I'm not using Docker, though.

这篇关于Docker容器中的H2 DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆