Raushan
Raushan

Reputation: 337

Unable to create log folder inside Wildfly server bin folder from docker container

I am running a Java application inside wildfly docker container. While starting the server, we create application log4j folders inside bin folder of wildfly (/opt/wildfly/bin).

I am getting exception: Unable to create file AppLog/AppLog.log java.io.IOException: Could not create directory /AppLog

Command to run docker container: docker run --name app_container --env-file=env-file -p 8080:8080 -p 9990:9990 -it app-resources /opt/wildfly/bin/standalone.sh

Upvotes: 0

Views: 504

Answers (1)

Mustafa Güler
Mustafa Güler

Reputation: 1014

Use WORKDIR to set path that user have permission to write on container. For example: /tmp or /path/user/have/permission/to/write

Upvotes: 0

Related Questions