Minified image curl error
Expected Behavior
As I run my image, it uses curl to fetch env file from git. After download is complete, it runs java/jboss and serves 8080.
Actual Behavior
When it tries to use curl I get: curl: (77) error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
After download fails, JBoss fails to start because it can't find the env file, specified on the command. (FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1)
Steps to Reproduce the Problem
-
docker run -it -p 8080:8080 -e ENV=prod image OK
-
docker-slim build --target image--http-probe=false
-
docker run -it -p 8080:8080 -e ENV=prod image.slim ERROR
Specifications
- Version: Docker 20.10.10, Docker-slim 1.37.0
- Platform: Debian 11
I have tried again with base image (without the need to download the env file and turns out the jboss also won't come up as expected. When booting it fails due to missing files:
Exception in thread "main" org.jboss.modules.ModuleLoadException: Error loading module from /opt/appsrv/EAP-7.1.5/modules/system/layers/base/sun/jdk/main/module.xml
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:298)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:254)
at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:215)
at org.jboss.modules.LocalModuleFinder.parseModuleXmlFile(LocalModuleFinder.java:256)
at org.jboss.modules.LocalModuleFinder.lambda$findModule$1(LocalModuleFinder.java:199)
at org.jboss.modules.LocalModuleFinder$$Lambda$2/00000000A02A4530.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:199)
at org.jboss.modules.ModuleLoader.findModule0(ModuleLoader.java:684)
at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:677)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:487)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:390)
at org.jboss.modules.Module.addExportedPaths(Module.java:1355)
at org.jboss.modules.Module.addPaths(Module.java:1247)
at org.jboss.modules.Module.link(Module.java:1574)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1602)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:287)
at org.jboss.modules.Main.main(Main.java:399)
Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to add resource root 'service-loader-resources' at path 'service-loader-resources' (position: END_TAG seen ... here -->\n
Thanks a lot for the additional info @thi747 ! Curious why you do docker-slim build --target image--http-probe=false instead of docker-slim build --publish-port 8080:8080 --env ENV=prod --target image, which would be closer to what you have with the docker run command.
Thanks a lot for the additional info @thi747 ! Curious why you do
docker-slim build --target image--http-probe=falseinstead ofdocker-slim build --publish-port 8080:8080 --env ENV=prod --target image, which would be closer to what you have with thedocker runcommand.
That was because I didn't find easy info on how to do stuff... I followed you advice and needed to add --expose 8080 to that to avoid building error (was I right?) but after running this new slim image I got the same jboss error as before.
testing other options I got to a point using also --preserve-path --include-path='/opt/appsrv', trying to save java and jboss. this way jboss goes up and netstat shows 8080 listening but even a local test gets connection refused....