You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by apiri <gi...@git.apache.org> on 2017/09/19 03:22:21 UTC

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

GitHub user apiri opened a pull request:

    https://github.com/apache/nifi/pull/2161

    NIFI-4333: Providing Docker support of the NiFi Toolkit

    NIFI-4333: 
    Providing Docker support of the NiFi Toolkit via Maven build and Docker
    Hub.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apiri/incubator-nifi nifi-4333

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2161.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2161
    
----
commit fc60f10c03457a2feaf9ad3f15a969d2e25e5120
Author: Aldrin Piri <al...@apache.org>
Date:   2017-09-15T18:53:01Z

    NIFI-4333:
    
    Providing Docker support of the NiFi Toolkit via Maven build and Docker
    Hub.

----


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r154681565
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
    @@ -100,4 +100,87 @@ language governing permissions and limitations under the License. -->
                 <scope>compile</scope>
             </dependency>
         </dependencies>
    +
    +
    +    <profiles>
    +        <profile>
    +            <id>docker</id>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <artifactId>maven-resources-plugin</artifactId>
    +                        <executions>
    +                            <execution>
    +                                <id>copy-resources</id>
    --- End diff --
    
    @kevdoran It does appear to be a bug.  Looks like I may have had a cached version in target while doing some work.  Fixed that up and pushed out the change.


---

[GitHub] nifi issue #2161: NIFI-4333: Providing Docker support of the NiFi Toolkit

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi/pull/2161
  
    Great, thanks!


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r154508401
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
    @@ -100,4 +100,87 @@ language governing permissions and limitations under the License. -->
                 <scope>compile</scope>
             </dependency>
         </dependencies>
    +
    +
    +    <profiles>
    +        <profile>
    +            <id>docker</id>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <artifactId>maven-resources-plugin</artifactId>
    +                        <executions>
    +                            <execution>
    +                                <id>copy-resources</id>
    --- End diff --
    
    not a huge deal but that would cause an additional layer in the image.  will play around with this a bit and see if there is something else that can be adjusted, otherwise will default to that
    
    Thanks!


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/2161


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by kevdoran <gi...@git.apache.org>.
Github user kevdoran commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r154688868
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
    @@ -100,4 +100,87 @@ language governing permissions and limitations under the License. -->
                 <scope>compile</scope>
             </dependency>
         </dependencies>
    +
    +
    +    <profiles>
    +        <profile>
    +            <id>docker</id>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <artifactId>maven-resources-plugin</artifactId>
    +                        <executions>
    +                            <execution>
    +                                <id>copy-resources</id>
    --- End diff --
    
    Thanks @apiri! It should be good now. I will verify locally and update my review.


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r153320426
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    @MikeThomsen Will evaluate the latter but given how the structure of docker images is currently composed this is needed as it will be making use of the generated nifi toolkit as part of the build which will be a SNAPSHOT.
    
    The Dockerfile.hub version is devoid of this given that it only is built against generated releases.


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by kevdoran <gi...@git.apache.org>.
Github user kevdoran commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r154488084
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/pom.xml ---
    @@ -100,4 +100,87 @@ language governing permissions and limitations under the License. -->
                 <scope>compile</scope>
             </dependency>
         </dependencies>
    +
    +
    +    <profiles>
    +        <profile>
    +            <id>docker</id>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <artifactId>maven-resources-plugin</artifactId>
    +                        <executions>
    +                            <execution>
    +                                <id>copy-resources</id>
    --- End diff --
    
    On my machine, this copy execution does not preserve file permissions for `docker-entrypoint.sh`, so when I try to run the image, I get: 
    
    > starting container process caused "exec: \"/opt/sh/docker-entrypoint.sh\": permission denied".


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r140604161
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    Will hardcoding the version here (and in Dockerfile.hub) cause extra maintenance for releases after 1.4.0?


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r152944214
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    Using this approach might be useful for injecting the build values into the Dockerfile prior to it being processed with Docker: https://stackoverflow.com/questions/34289889/how-to-inject-maven-profile-value-into-properties-file#34290331


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r154153740
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    Updated with a new commit that does resource filtering as linked above.  


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r152943230
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    -SNAPSHOT should be removed because it's a mavenism that applies to non-release builds.


---

[GitHub] nifi pull request #2161: NIFI-4333: Providing Docker support of the NiFi Too...

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2161#discussion_r153581396
  
    --- Diff: nifi-toolkit/nifi-toolkit-assembly/docker/Dockerfile ---
    @@ -0,0 +1,48 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements. See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership. The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License. You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied. See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +FROM openjdk:8-jre-alpine
    +LABEL maintainer "Apache NiFi <de...@nifi.apache.org>"
    +
    +ARG UID=1000
    +ARG GID=1000
    +ARG NIFI_TOOLKIT_VERSION=1.4.0-SNAPSHOT
    --- End diff --
    
    AFAIK, Maven provides a build variable you can use for that. So you should be able to collapse the two together at some point if you take advantage of that assuming that there are no other reasons to keep them separate.


---