AnthonyMastrean commented on issue #3266: NIFI-5955 add a Docker HEALTHCHECK
URL: https://github.com/apache/nifi/pull/3266#issuecomment-453660043
 
 
   I built an image based on this branch
   
   ```
   $ docker build --build-arg UID="1000" --build-arg GID="1000" --build-arg 
NIFI_VERSION="1.8.0" --build-arg MIRROR="https://archive.apache.org/dist"; -t 
nifi:healthcheck .
   ```
   
   And checked that I could run it without any ports published (just in case).
   
   ```
   $ docker run -d --name nifi nifi:healthcheck
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
       STATUS                            PORTS                           NAMES
   fea089fbb48f        nifi:healthcheck    "../scripts/start.sh"   3 seconds 
ago       Up 2 seconds (health: starting)   8080/tcp, 8443/tcp, 10000/tcp   nifi
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
        STATUS                        PORTS                           NAMES
   fea089fbb48f        nifi:healthcheck    "../scripts/start.sh"   About a 
minute ago   Up About a minute (healthy)   8080/tcp, 8443/tcp, 10000/tcp   nifi
   ```
   
   With the default port.
   
   ```
   $ docker run -d -p 8080:8080 --name nifi nifi:healthcheck
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
       STATUS                            PORTS                                  
       NAMES
   e033f84c25be        nifi:healthcheck    "../scripts/start.sh"   5 seconds 
ago       Up 4 seconds (health: starting)   8443/tcp, 0.0.0.0:8080->8080/tcp, 
10000/tcp   nifi
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
        STATUS                        PORTS                                     
    NAMES
   e033f84c25be        nifi:healthcheck    "../scripts/start.sh"   About a 
minute ago   Up About a minute (healthy)   8443/tcp, 0.0.0.0:8080->8080/tcp, 
10000/tcp   nifi
   ```
   
   And with a custom port.
   
   ```
   $ docker run -d -p 9090:9090 --name nifi nifi:healthcheck
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
       STATUS                            PORTS                                  
                 NAMES
   f4ad75f735d4        nifi:healthcheck    "../scripts/start.sh"   6 seconds 
ago       Up 4 seconds (health: starting)   8080/tcp, 8443/tcp, 10000/tcp, 
0.0.0.0:9090->9090/tcp   nifi
   ```
   ```
   $ docker ps --filter name=nifi
   CONTAINER ID        IMAGE               COMMAND                 CREATED      
        STATUS                        PORTS                                     
              NAMES
   f4ad75f735d4        nifi:healthcheck    "../scripts/start.sh"   About a 
minute ago   Up About a minute (healthy)   8080/tcp, 8443/tcp, 10000/tcp, 
0.0.0.0:9090->9090/tcp   nifi
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to