lhotari commented on a change in pull request #13376:
URL: https://github.com/apache/pulsar/pull/13376#discussion_r771167834
##########
File path: docker/pulsar/Dockerfile
##########
@@ -33,7 +33,13 @@ COPY scripts/pulsar-zookeeper-ruok.sh /pulsar/bin
COPY scripts/watch-znode.py /pulsar/bin
COPY scripts/install-pulsar-client.sh /pulsar/bin
-RUN mkdir /pulsar/data
+# In order to support running this docker image as a container on OpenShift
+# the final image needs to give the root group sufficient permission.
+# The file permissions are preserved when copying files from this builder
image to the target image.
+RUN chmod -R g+w /pulsar/conf
+RUN mkdir /pulsar/data && chmod -R g+w /pulsar/data
+RUN mkdir /pulsar/logs && chmod -R g+w /pulsar/logs
+RUN chmod -R u-w /pulsar
Review comment:
I think that the number of RUN lines in the Dockerfile should be
minimized, since each RUN will create a new layer. All of these lines could be
combined in one RUN.
`docker build --squash`/`-Ddockerfile.build.squash=true` resolves that issue
for the final docker image, however that would require enabling experimental
mode in the docker daemon which isn't there by default ([example for GH
CI](https://github.com/lhotari/pulsar/blob/178eebdd97c6b9fff6b460089bdc3d8d5e4337a3/.github/actions/tune-os/action.yml#L44-L47)).
--
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]