[ 
https://issues.apache.org/jira/browse/KAFKA-7581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725589#comment-16725589
 ] 

Jordan Moore commented on KAFKA-7581:
-------------------------------------

If this problem is with *building Kafka* in a Docker container, then no 
external system is "linked" to the build process. 

That being said, I don't think this is a blocker, and I cannot reproduce. Here 
is even a Dockerfile that I just made 

{code}
FROM ubuntu:16.04

ARG JAVA_VERSION=8.0.192-zulu
ARG GRADLE_VERSION=4.8.1
ARG KAFKA_VERSION=2.0.0
ARG SCALA_VERSION=2.11

RUN apt-get update && apt-get install -y \
  curl \
  zip \
  unzip \
  && rm -rf /var/apt/lists/*

RUN curl -s "https://get.sdkman.io"; | bash
RUN ["/bin/bash", "-c", "source /root/.sdkman/bin/sdkman-init.sh; \
    sdk i java $JAVA_VERSION && sdk i gradle $GRADLE_VERSION"]

RUN mkdir /kafka-src \
  && curl 
https://archive.apache.org/dist/kafka/$KAFKA_VERSION/kafka-$KAFKA_VERSION-src.tgz
 \
    | tar -xvzC /kafka-src --strip-components=1

WORKDIR /kafka-src
RUN ["/bin/bash", "-c", "source /root/.sdkman/bin/sdkman-init.sh; \
 gradle && ./gradlew -PscalaVersion=$SCALA_VERSION releaseTarGz -x 
signArchives"]
{code}

And it builds the release tarball, which you could use in a multi-stage build, 
for example

{code}
docker run --rm -ti kafka-7581:latest bash -c "ls -ltr 
/kafka-src/core/build/distributions/"
total 57888
-rw-r--r-- 1 root root  3343041 Dec 20 04:57 kafka_2.11-2.0.0-site-docs.tgz
-rw-r--r-- 1 root root 55928942 Dec 20 04:57 kafka_2.11-2.0.0.tgz
{code}

> Issues in building kafka using gradle on a Ubuntu based docker container
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-7581
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7581
>             Project: Kafka
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 2.0.0, 2.0.1, 2.1.0, 2.2.0, 2.1.1, 2.0.2
>         Environment: Ubuntu 16.04.3 LTS
>            Reporter: Sarvesh Tamba
>            Priority: Blocker
>
> The following issues are seen when kafka is built using gradle on a Ubuntu 
> based docker container:-
> /kafka-gradle/kafka-2.0.0/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala:177:
>  File name too long
>  This can happen on some encrypted or legacy file systems. Please see SI-3623 
> for more details.
>  .foreach { txnMetadataCacheEntry =>
>  ^
>  56 warnings found
>  one error found
> > Task :core:compileScala FAILED
> FAILURE: Build failed with an exception.
> * What went wrong:
>  Execution failed for task ':core:compileScala'.
>  > Compilation failed



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to