tisonkun commented on code in PR #17129:
URL: https://github.com/apache/pulsar/pull/17129#discussion_r948602287


##########
docker/pulsar/Dockerfile:
##########
@@ -76,8 +86,8 @@ RUN pip3 install pyyaml==5.4.1
 # 4. /pulsar - hadoop writes to this directory
 RUN mkdir /pulsar && chmod g+w /pulsar
 
-ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
-RUN echo networkaddress.cache.ttl=1 >> 
/usr/lib/jvm/java-17-openjdk-amd64/conf/security/java.security
+ENV JAVA_HOME /usr/lib/jvm/temurin-17-jdk-amd64
+RUN echo networkaddress.cache.ttl=1 >> 
/usr/lib/jvm/temurin-17-jdk-amd64/conf/security/java.security

Review Comment:
   Before this change, when I build on M1 with `Docker version 20.10.17, build 
100c701`, it failed with:
   
   ```
   [INFO] DOCKER> Step 14/25 : ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
   [INFO] DOCKER> 
   [INFO] DOCKER> ---> Running in a47a209de148
   [INFO] DOCKER> Removing intermediate container a47a209de148
   [INFO] DOCKER> ---> 6a9d5c8543b8
   [INFO] DOCKER> Step 15/25 : RUN echo networkaddress.cache.ttl=1 >> 
/usr/lib/jvm/java-17-openjdk-amd64/conf/security/java.security
   [INFO] DOCKER> 
   [INFO] DOCKER> ---> Running in d55c15e90ed1
   [INFO] DOCKER> [91m/bin/sh: 1: cannot create 
/usr/lib/jvm/java-17-openjdk-amd64/conf/security/java.security: Directory 
nonexistent
   
   [INFO] DOCKER> Removing intermediate container d55c15e90ed1
   [ERROR] DOCKER> Unable to build image [apachepulsar/java-test-image] : "The 
command '/bin/sh -c echo networkaddress.cache.ttl=1 >> 
/usr/lib/jvm/java-17-openjdk-amd64/conf/security/java.security' returned a 
non-zero code: 2"  ["The command '/bin/sh -c echo networkaddress.cache.ttl=1 >> 
/usr/lib/jvm/java-17-openjdk-amd64/conf/security/java.security' returned a 
non-zero code: 2" ]
   ```
   
   Perhaps it's unrelated to this patch. Just throw here by any chances we may 
`mkdir -p` before `echo`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to