fix: make sure bytes are ok@@ -125,7 +125,7 @@ module Docker::Api::Containers
"Cmd": command,
"Env": {
"FOO": "foo",
- } of String => String, # make it configurable
+ }, # make it configurable
}
exec_res = post "/containers/#{id}/exec", body: props.to_jsonbody
@@ -157,7 +157,7 @@ module Docker::Api::Containers
param.add "path", path
end
response = get "/containers/#{id}/archive?#{params}"
- Bytes.new(response.body)
+ response.body.to_slice
end
# Send an archive to a container
@@ -168,7 +168,7 @@ module Docker::Api::Containers
params = HTTP::Params.build do |param|
param.add "path", path
end
- body = Bytes.new(archive).to_slice
+ body = archive.to_slice
response = put "/containers/#{id}/archive?#{params}", headers, body
response.body
end
@@ -135,7 +135,7 @@ module Docker::Api::Models
# @[JSON::Field(key: "KernelMemory")]
# getter kernel_memory : Int32
@[JSON::Field(key: "OomKillDisable")]
- getter oom_kill_disable : Bool
+ getter oom_kill_disable : Bool?
@[JSON::Field(key: "OomScoreAdj")]
getter joom_score_adj : Int32
@[JSON::Field(key: "NetworkMode")]
@@ -56,7 +56,7 @@ class Docker::Container
end
# Run command inside the container.
- def exec(command: Array(String))
+ def exec(command : Array(String))
client.exec id, command
self
end