-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24533/#review50143
-----------------------------------------------------------


Not a complete review yet, wanted to help out with 
https://reviews.apache.org/r/24541.


src/docker/docker.hpp
<https://reviews.apache.org/r/24533/#comment87740>

    Why not return 'Image' and make it public?



src/docker/docker.cpp
<https://reviews.apache.org/r/24533/#comment87741>

    s/str/s/



src/docker/docker.cpp
<https://reviews.apache.org/r/24533/#comment87761>

    Okay, it's very very clear that we need some JSON helpers for looking 
things up!!! This is getting insane! ;-)
    
    I just threw up https://reviews.apache.org/r/24541 which should let you do:
    
    Result<JSON::Value> entrypoint =
      json.find<JSON::Value>("ContainerConfig.Entrypoint");
    
    if (entrypoint.isError()) {
      return Error("Failed to find 'ContainerConfig.Entrypoint': " +
                   entrypoint.error());
    } else if (entrypoint.isNone()) {
      return Error("Unable to find 'ContainerConfig.Entrypoint'");
    }
    
    if (entrypoint.is<JSON::Null>()) {
      return Docker::Image(None());
    }
    
    if (!entrypoint.is<JSON::Array>()) {
      return Error("Unexpected type found for 'ContainerConfig.Entrypoint' (not 
an array)");
    }
    
    ...



src/docker/docker.cpp
<https://reviews.apache.org/r/24533/#comment87762>

    Might the entrypoint not actually be all of the values in the JSON array?


- Benjamin Hindman


On Aug. 10, 2014, 7:44 a.m., Timothy Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24533/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2014, 7:44 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ian Downes, and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> We need to treat docker images with entrypoint specially since a docker image 
> without an entrypoint requires us to wrap the command in /bin/sh -c, where 
> command to a image with entrypoint should be passed arguments directly to the 
> image.
> 
> 
> Diffs
> -----
> 
>   src/docker/docker.hpp 98b2d60 
>   src/docker/docker.cpp 1cba381 
> 
> Diff: https://reviews.apache.org/r/24533/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Timothy Chen
> 
>

Reply via email to