adriancole commented on pull request #5818:
URL: https://github.com/apache/incubator-pinot/pull/5818#issuecomment-670818315


   for completion, here's a Dockerfile that uses it. Maybe not perfect, but 
possibly helpful in showing where the script is useful.
   
   ```Dockerfile
   FROM alpine:3.12 as pinot
   
   ARG USER=apache
   ARG TAG=master-SNAPSHOT
   
   WORKDIR /pinot
   
   # Jitpack makes it possible to grab a file built on-demand from a branch or 
a commit
   # Effectively it caches the result of maven, so that your laptop doesn't 
burn up so much building!
   # Ex. https://jitpack.io/#apache/incubator-pinot
   RUN jitpack() { lib=$1; dir=$2; mkdir -p $dir; wget -q -P $dir 
https://jitpack.io/com/github/$USER/incubator-pinot/$lib/$TAG/$lib-$TAG-shaded.jar
 ; } ; \
       # Pinot requires the main jar
       jitpack pinot-distribution lib && \
       # Add plugins you want
       jitpack pinot-kafka-2.0 plugins/pinot-stream-ingestion/pinot-kafka-2.0
   
   FROM openzipkin/jre-full:14.0.2-14.29.23
   
   ENV PINOT_HOME=/pinot
   ENV PINOT_VAR=/var/pinot
   ENV JAVA_OPTS="-Xms128M -Xmx192M -XX:MaxDirectMemorySize=64M 
-XX:+ExitOnOutOfMemoryError"
   
   WORKDIR ${PINOT_HOME}
   
   # Ensure pinot doesn't run as root
   RUN adduser -g '' -h ${PINOT_HOME} -D pinot && \
       mkdir -p ${PINOT_VAR}/server/data ${PINOT_VAR}/controller/data && \
       chown -R pinot ${PINOT_VAR}
   
   USER pinot
   COPY --from=pinot --chown=pinot /pinot ${PINOT_HOME}
   
   # Add patched admin script so that it works with /bin/sh
   COPY --chown=pinot pinot-admin.sh ${PINOT_HOME}/bin/pinot-admin.sh
   
   # expose ports for controller/broker/server/admin
   EXPOSE 9000 8099 8098 8097 8096 9514
   
   ENTRYPOINT ["./bin/pinot-admin.sh"]
   
   CMD ["run"]
   ```


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to