* NewDockerContainer: restore "from env" behavior
commit c31948caeb replaced the deprecated
`dockerclient.NewEnvClient` with `dockerclient.NewClientWithOpts`, but
did not add the `FromEnv` option to keep the old behavior.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* NewDockerContainer: use API version negotiation
This helps in situations where the daemon is older than
the API client. API version negotiation checks the maximum
supported API version by the daemon, and downgrades to that
API version if needed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Stop leaking tickers. As the docs state, using time.Tick() will leak tickers,
so use time.NewTicker() with time.Ticker.Stop().
- Be more efficient by using time.NewTimer() with time.Timer.Stop() instead of time.After().
Adds the ability to specify a series of commands to run as part
of the docker image execution, and allows for retrieving a mapping
of an exposed via the port bound within the container.