1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

27 commits

Author SHA1 Message Date
Antonio Murdaca
c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Eric Windisch
ca37301d54 Link to HTTPS URLs in engine comments
Updates most of the instances of HTTP urls in the engine's
comments. Does not account for any use in the code itself,
documentation, contrib, or project files.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-04-11 13:31:34 -04:00
Qiang Huang
0aa250bd60 fix decode data loss when using int64 in json
The problem is when I create container though REST api, set memory limit
in hostConfig, the memory limit didn't work. Because when we DecodeEnv,
we got hostConfig part of Env like this:
{"Binds":["/:/tmp"],"CpuShares":512,"CpusetCpus":"0,1","Devices":[],"Memory":1.6777216e+07,"MemorySwap":0}

And we cannot unmarshal number 1.6777216e+07 into Go value of type int64,
so we got 0.

We can fix this by setting Decoder as UseNumber().

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-21 10:16:18 +08:00
Ahmet Alp Balkan
2977fd2b7a Add system time to /info
This change adds daemon's system time as RFC3339Nano to the `/info` endpoint
and shows in a more readable format (UnixDate) in `docker -D info` output.

I will be using this to fix the clock skew between the remote test host and
the CI machines running `docker events`-related tests as they're using `--since`
and `--until` and the timestamps are not matching when daemon is not on the
same machine.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-03-10 15:29:05 -07:00
Pierre Wacrenier
0cd30cf399 Fix env.WriteTo count return
Some calls like json.Encoder.Encode mask the number of bytes written to
an io.Writer. The solution provides a wrapper io.Writer around the
actual io.Writer that allows multiple calls to Write to be considered as
one and allow access to this count.

Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-01-21 01:14:23 +01:00
Doug Davis
a7cd25b8b6 Fix error paring null JSON - Issue7941
Closes #7941

Treat a null in JSON, when reading the config of a container, as if the
property was never included.  W/o this fix the null would be saved in the
property as a string with a value of "null".

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-09-28 19:51:00 -07:00
Vincent Batts
6e0bc06018 engine.Env: comments and tests for Get()
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2014-09-10 22:20:49 -04:00
LK4D4
1d3d1c5d2b Change floats to ints recursively on env encoding
Fixes #6246
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-24 23:39:26 +00:00
Solomon Hykes
c7978c9809 Engine: Env.MultiMap, Env.InitMultiMap: import/export to other formats
* `Env.MultiMap` returns the contents of an Env as `map[string][]string`
* `Env.InitMultiMap` initializes the contents of an Env from a `map[string][]string`

This makes it easier to import and export an Env to other formats
(specifically `beam/data` messages)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-05-09 17:06:32 -07:00
Bryan Murphy
fdccfaf72a move Table to a separate file and add additional unit tests
Docker-DCO-1.1-Signed-off-by: Bryan Murphy <bmurphy1976@gmail.com> (github: bmurphy1976)
2014-05-08 02:31:23 +00:00
Solomon Hykes
9b23178f58 engine.Len returns the number of keys in an env
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-28 00:37:42 -07:00
Michael Crosby
95e6fd819b Revert "engine: fix engine.Env.Encode() to stop auto-guessing types."
This reverts commit 76057addb2.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-04 11:29:56 -07:00
Solomon Hykes
76057addb2 engine: fix engine.Env.Encode() to stop auto-guessing types.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-03 23:53:42 +00:00
Solomon Hykes
0469e7d062 Engine: tiny cosmetic fix
To make @creack happy :)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 12:31:39 -08:00
Solomon Hykes
2019a73f03 Engine.ParseJob: create a new job from a shell-like text command.
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-02-24 11:38:13 -08:00
Victor Vieux
8fbdb7b59e add setSubEnv and getSubEnv
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 04:01:46 +00:00
Victor Vieux
28b5ae8cc4 changed default value of getenvint to 0. fix tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-31 02:06:08 +00:00
Victor Vieux
187646127f fix convertion issues
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-30 00:56:42 +00:00
Victor Vieux
5ea2986ce5 Move containers to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 16:07:42 -08:00
Victor Vieux
f41e0cf048 fix error handling
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-24 14:59:46 -08:00
Victor Vieux
e3461bc8d6 switch back to the valid json format
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-21 15:06:23 -08:00
Victor Vieux
3a610f754f Add compat 1.8
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-01-13 15:50:20 -08:00
Solomon Hykes
17a806c8a0 Port 'docker images' to the engine API
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-01-13 15:49:33 -08:00
Victor Vieux
85b9338205 add GetenvInt64 ans SetenvInt64 2013-12-13 16:29:22 -08:00
Victor Vieux
d5f5ecb658 improve GetenvJson 2013-12-13 16:02:19 -08:00
Victor Vieux
930ec9f52c move commit to job 2013-12-13 14:19:56 -08:00
Solomon Hykes
a80c059bae Engine: break out Env utilities into their own type - Env 2013-12-08 06:06:05 +00:00