私はmysqlとtomcatをSSHと一緒に1つのコンテナに入れています。DockerfileのSSHと一緒にmysqlとtomcatを順番に起動できますか?
mysqlとtomcatを2つのコンテナに分割することができませんでした。私がしたことは、MySQLの公式Dockerfile(link)とdocker-entrypoint.sh
ファイル(link)をフォローして、私自身のDockerfile
とdocker-entrypoint.sh
ファイルを作成することです。私はdocker-entrypoint.shにいくつかのコマンドを追加して、mysqlの起動後にtomcatまたはSSHを起動しようとしましたが、失敗しました。私はdocker-entrypoint.sh
にexec "[email protected]"
前にこのコマンド/usr/local/apache-tomcat-7.0.81/bin/catalina.sh run &
を追加しようとした、と私は、Tomcatサーバが起動して見ることができるが、私のアプリケーションは以下のようにJavaのエラーが発生したになります。
log4j:ERROR setFile(null,true) call failed
java.io.FileNotFoundException: ../logs/jeeplus/jeeplus.log (No such file or directory)
2017-10-22 12:05:18,056 WARN [springframework.web.context.support.XmlWebApplicationContext] - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring-context-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring-context-shiro.xml]: Cannot resolve reference to bean 'sessionManager' while setting bean property 'sessionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [spring-context-shiro.xml]: Cannot resolve reference to bean 'sessionDAO' while setting bean property 'sessionDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionDAO' defined in class path resource [spring-context-shiro.xml]: Cannot resolve reference to bean 'shiroCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroCacheManager' defined in class path resource [spring-context-shiro.xml]: Cannot resolve reference to bean 'cacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [spring-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Disk store path can't be created: ../temp/jeeplus/ehcache
しかし、私は手動経由でTomcatを起動するためにコンテナに行けばcatalina.sh
、私のアプリケーションは正常に動作します。
この問題を解決する方法がわかりません。あなたはこのようなS6、TINIやスーパーバイザーとしてinitシステムを使用する必要があります
はあなたのドッキングウィンドウのファイル – zachdb86