Changing the default user in logstash docker image build

I've been tying to run my logstash as a docker container using a self created user on cent os 7 . But from what it looks like the image docker.elastic.co/logstash/logstash:6.4.2 creates it use Logstash user . Went through the documentation of this image and this creation of user is defined in Dockerfile.j2 . Wanted to know if it would be a good idea to change this to my local user in this file and then build the image ?
GitHub - elastic/logstash-docker at 6.4

        # Provide a non-root user to run the process.
    RUN groupadd --gid 1000 logstash && \
        adduser --uid 1000 --gid 1000 \
          --home-dir /usr/share/logstash --no-create-home \
          logstash

    # Add Logstash itself.
    RUN curl -Lo - {{ url_root }}/{{ tarball }} | \
        tar zxf - -C /usr/share && \
        mv /usr/share/logstash-{{ elastic_version }} /usr/share/logstash && \
        chown --recursive logstash:logstash /usr/share/logstash/ && \
        chown -R logstash:root /usr/share/logstash && \
        chmod -R g=u /usr/share/logstash && \
        find /usr/share/logstash -type d -exec chmod g+s {} \; && \
        ln -s /usr/share/logstash /opt/logstash  

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.