You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/08/29 09:29:37 UTC

[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #882: MINIFICPP-1343 Create a minimal docker image target

lordgamez commented on a change in pull request #882:
URL: https://github.com/apache/nifi-minifi-cpp/pull/882#discussion_r479630603



##########
File path: docker/Dockerfile
##########
@@ -54,44 +53,90 @@ RUN apk --update --no-cache upgrade && apk --update --no-cache add gcc \
 	libressl-dev \
 	zlib-dev \
 	bzip2-dev \
-	python3-dev
+	python3-dev \
+	patch \
+	doxygen
 
 ENV USER minificpp
 ENV MINIFI_BASE_DIR /opt/minifi
+ENV JAVA_HOME /usr/lib/jvm/default-jvm
+ENV PATH ${PATH}:/usr/lib/jvm/default-jvm/bin
+ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-${MINIFI_VERSION}
 
 # Setup minificpp user
 RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER}
-RUN mkdir -p ${MINIFI_BASE_DIR}
-ENV JAVA_HOME /usr/lib/jvm/default-jvm
-ENV PATH ${PATH}:/usr/lib/jvm/default-jvm/bin
 
-ADD ${MINIFI_SOURCE_CODE} ${MINIFI_BASE_DIR}
-RUN chown -R ${USER}:${USER} ${MINIFI_BASE_DIR}
+RUN install -d -o ${USER} -g ${USER} ${MINIFI_BASE_DIR}
+COPY --chown=${USER}:${USER} ${MINIFI_SOURCE_CODE} ${MINIFI_BASE_DIR}
 
 USER ${USER}
 
-ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-${MINIFI_VERSION}
 
-# Perform the build
+# Build stage of the minimal image
+FROM build_deps AS build_minimal
+RUN cd ${MINIFI_BASE_DIR} \
+	&& mkdir build \
+	&& cd build \
+	&& cmake -DDISABLE_LIBARCHIVE=ON -DDISABLE_SCRIPTING=ON -DENABLE_LIBRDKAFKA=ON -DSKIP_TESTS=true -DCMAKE_BUILD_TYPE=MinSizeRel .. \

Review comment:
       Yes, Kafka and libcurl were asked to be included in the minimum image.




----------------------------------------------------------------
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:
users@infra.apache.org