wso2 / docker-is

Docker and Docker Compose resources for WSO2 Identity Server
Apache License 2.0
92 stars 155 forks source link

Ubuntu Dockerfile passes incorrect java user preferences path to image #356

Open NCMEC-daavendasora opened 2 years ago

NCMEC-daavendasora commented 2 years ago

Description: java.util.prefs.userRoot should simply point to ${USER_HOME}. Specifying ${USER_HOME}.java/.userPrefs is redundant and causes java.util.prefs.userRoot to be defined as ${USER_HOME}.java/.userPrefs/.java/.userPrefs

Affected Product Version: 6.0.0.1

Steps to reproduce:

  1. cd docker-is/dockerfiles/ubuntu/is
  2. docker build -t wso2/wso2is:6.0.0-ubuntu --build-arg "WSO2_SERVER_DIST_URL=https://wso2.org/path/to/wso2is-6.0.0.zip" .
  3. docker run --name wso2is-6.0.0 --rm -i -t wso2/wso2is:6.0.0-ubuntu
  4. docker exec -it wso2is-6.0.0 bash
  5. ls -la /home/wso2carbon/.java/.userPrefs/ the output will be:
    drwxr-xr-x 1 wso2carbon wso2 4096 Sep  8 07:04 .
    drwxr-xr-x 1 wso2carbon wso2 4096 Sep  8 06:52 ..
    drwxr-xr-x 3 wso2carbon wso2 4096 Sep  8 07:04 .java
  6. ls -la /home/wso2carbon/.java/.userPrefs/.java/.userPrefs/ produces this output:
    drwx------ 2 wso2carbon wso2 4096 Sep  8 07:04 .
    drwxr-xr-x 3 wso2carbon wso2 4096 Sep  8 07:04 ..
    -rw------- 1 wso2carbon wso2    0 Sep  8 07:04 .user.lock.wso2carbon
    -rw------- 1 wso2carbon wso2    0 Sep  8 07:04 .userRootModFile.wso2carbon

Related Issues: #355 Location to store java preferences is not used by Alpine & Centos images