Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docker/pulsar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ RUN mkdir /pulsar && chmod g+w /pulsar

ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE

COPY --from=pulsar /pulsar /pulsar
RUN groupadd -g 10000 pulsar && \
useradd -r -u 10000 -g pulsar pulsar

COPY --from=pulsar --chown=10000:10000 /pulsar /pulsar
RUN chown pulsar:pulsar /pulsar

WORKDIR /pulsar

ARG PULSAR_CLIENT_PYTHON_VERSION
Expand All @@ -104,4 +109,4 @@ RUN chmod +x /pulsar/bin/install-pulsar-client.sh
RUN /pulsar/bin/install-pulsar-client.sh

# The UID must be non-zero. Otherwise, it is arbitrary. No logic should rely on its specific value.
USER 10000
USER 10000:10000
6 changes: 3 additions & 3 deletions tests/docker-images/java-test-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

FROM ubuntu:22.04

RUN groupadd -g 10001 pulsar
RUN adduser -u 10000 --gid 10001 --disabled-login --disabled-password --gecos '' pulsar
RUN groupadd -g 10000 pulsar && \
useradd -r -u 10000 -g pulsar pulsar

ARG PULSAR_TARBALL=target/pulsar-server-distribution-bin.tar.gz
ADD ${PULSAR_TARBALL} /
Expand Down Expand Up @@ -75,7 +75,7 @@ COPY target/java-test-functions.jar /pulsar/examples/

ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE

RUN chown -R pulsar:0 /pulsar && chmod -R g=u /pulsar
RUN chown -R pulsar:pulsar /pulsar

# cleanup
RUN apt-get -y --purge autoremove \
Expand Down
4 changes: 0 additions & 4 deletions tests/docker-images/latest-version-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ FROM apachepulsar/pulsar:latest
# However, any processes exec'ing into the containers will run as root, by default.
USER root

# We need to define the user in order for supervisord to work correctly
# We don't need a user defined in the public docker image, though.
RUN adduser -u 10000 --gid 0 --disabled-login --disabled-password --gecos '' pulsar

RUN rm -rf /var/lib/apt/lists/* && apt update

RUN apt-get clean && apt-get update && apt-get install -y supervisor vim procps curl
Expand Down