Wildfly WAR deployment fails on Linux – File Not Found Exception

I am trying to deploy a WAR-based application using Wildfly 16.0.0.Final. The application consists of a WAR file and a .properties file. I put the WAR file in the standalone/deployments folder and the .properties file in the bin folder. Running it on Windows, it works as long as I don’t try to run the Wildfly server with elevated permissions. On Linux (Centos 7) as well as the official Wildfly Docker image, the deployment fails. This is the exception every time:

 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 82) MSC000001: Failed to start service jboss.deployment.unit."foo.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."foo.war".undertow-deployment: java.lang.RuntimeException: RESTEASY003325: Failed to construct public com.foo.application.FooConfig()

I’m not sure why it doesn’t show up on Docker, but on Linux I see this error on the previous line:

[ServerService Thread Pool -- 82] ERROR com.foo.component.config.ConfigProperties - java.io.FileNotFoundException: foo.properties (No such file or directory)

Incidentally, I got the same combination of errors when I tried running it with admin privileges on Windows. I’ve tried to update the ownership and permissions on the .properties file on Linux and Docker to make sure it’s not a permissions issue, but it just doesn’t seem to see the file for some reason. I also copied it to multiple directories thinking that maybe it was looking in a different spot for some reason, but to no avail.

What might I be missing?

Source: Docker Questions