summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_build.go4
-rw-r--r--pkg/api/handlers/types.go17
2 files changed, 11 insertions, 10 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 6cc766a38..399c104e9 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -36,6 +36,7 @@ func BuildImage(w http.ResponseWriter, r *http.Request) {
if hdr[0] != "application/x-tar" {
utils.BadRequest(w, "Content-Type", hdr[0],
fmt.Errorf("Content-Type: %s is not supported. Should be \"application/x-tar\"", hdr[0]))
+ return
}
}
@@ -260,8 +261,7 @@ func extractTarFile(r *http.Request, w http.ResponseWriter) (string, error) {
r.Body.Close()
if err != nil {
- utils.InternalServerError(w,
- fmt.Errorf("failed Request: Unable to copy tar file from request body %s", r.RequestURI))
+ return "", fmt.Errorf("failed Request: Unable to copy tar file from request body %s", r.RequestURI)
}
_, _ = tarBall.Seek(0, 0)
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index 79aeff2f8..c1e84ab5a 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -247,6 +247,7 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
if err != nil {
return nil, err
}
+
// TODO the rest of these still need wiring!
config := dockerContainer.Config{
// Hostname: "",
@@ -261,17 +262,17 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
// StdinOnce: false,
Env: info.Config.Env,
Cmd: info.Config.Cmd,
- // Healthcheck: nil,
+ //Healthcheck: l.ImageData.HealthCheck,
// ArgsEscaped: false,
// Image: "",
- // Volumes: nil,
- // WorkingDir: "",
- // Entrypoint: nil,
+ Volumes: info.Config.Volumes,
+ WorkingDir: info.Config.WorkingDir,
+ Entrypoint: info.Config.Entrypoint,
// NetworkDisabled: false,
// MacAddress: "",
- // OnBuild: nil,
- Labels: info.Labels,
- // StopSignal: "",
+ //OnBuild: info.Config.OnBuild,
+ Labels: info.Labels,
+ StopSignal: info.Config.StopSignal,
// StopTimeout: nil,
// Shell: nil,
}
@@ -285,7 +286,7 @@ func ImageDataToImageInspect(ctx context.Context, l *libpodImage.Image) (*ImageI
Comment: info.Comment,
Config: &config,
Created: l.Created().Format(time.RFC3339Nano),
- DockerVersion: "",
+ DockerVersion: info.Version,
GraphDriver: docker.GraphDriverData{},
ID: fmt.Sprintf("sha256:%s", l.ID()),
Metadata: docker.ImageMetadata{},