Skip to content

Commit

Permalink
[fix][broker] Support running docker container with gid != 0 (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Feb 21, 2024
1 parent 0b6bd70 commit 4097ddd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docker/pulsar/Dockerfile
Expand Up @@ -36,10 +36,14 @@ COPY scripts/install-pulsar-client.sh /pulsar/bin

# The final image needs to give the root group sufficient permission for Pulsar components
# to write to specific directories within /pulsar
# The ownership is changed to uid 10000 to allow using a different root group. This is necessary when running the
# container when gid=0 is prohibited. In that case, the container must be run with uid 10000 with
# any group id != 0 (for example 10001).
# The file permissions are preserved when copying files from this builder image to the target image.
RUN for SUBDIRECTORY in conf data download logs; do \
[ -d /pulsar/$SUBDIRECTORY ] || mkdir /pulsar/$SUBDIRECTORY; \
chmod -R g+w /pulsar/$SUBDIRECTORY; \
chmod -R ug+w /pulsar/$SUBDIRECTORY; \
chown -R 10000:0 /pulsar/$SUBDIRECTORY; \
done

### Create 2nd stage from Ubuntu image
Expand Down

0 comments on commit 4097ddd

Please sign in to comment.