10 Commits

Author SHA1 Message Date
57599f0075 Fix up handling of environment variables
The way docker works is if a user specifies a non `-e Name=Value`, IE
just a `-e Name`, then the environment variable Name from the clients
OS.ENV is used.

Also by default Docker containers run with the HOSTNAME environment set
to the HOSTNAME specified for the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #21
Approved by: baude
2017-11-20 16:25:31 +00:00
acd9c66864 Fix terminal attach
Re-order the startup of a new container via run from
initialize > start > attach to initialize > attach > start.

This fixes output when running:

kpod run -i -t IMAGE command

and

kpod run IMAGE command

Signed-off-by: baude <bbaude@redhat.com>
2017-11-15 16:27:57 -06:00
5cfd7a313f Address run/create performance issues
Fixed the logic where we observed different performance
results when running an image by its fqname vs a shortname. In
the case of the latter, we resolve the name without using the
network.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #37
Approved by: rhatdan
2017-11-14 21:14:13 +00:00
b8dca1874d Do not attempt to use command --args as cli flags
i.e. kpod run fedora python --version

Signed-off-by: baude <bbaude@redhat.com>

Closes: #33
Approved by: rhatdan
2017-11-08 21:49:15 +00:00
84e3bdceda Fix panic when no image is given
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #31
Approved by: mheon
2017-11-08 21:18:08 +00:00
aa19565d8d spec.go: Remove cli context as func arg
Remove cli context as a func arg to make unit tests
easier.

Signed-off-by: baude <bbaude@redhat.com>
2017-11-03 20:37:33 -05:00
46d762176e create_cli_test.go: Unittests
Create unittests for the create_cli helper functions. As
such, remove cli context usage from the functions to
further divide between cli input and parsing.  Also, simplifies
unit testing.

Signed-off-by: baude <bbaude@redhat.com>
2017-11-03 20:37:19 -05:00
098389dc3e Parse SecurityOpts
This should turn on handling of SELinux, NoNewPrivs, seccomp and Apparmor

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #15
Approved by: rhatdan
2017-11-03 20:55:10 +00:00
92818fdfb7 Fix gofmt errors
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-02 15:30:39 -04:00
8cf07b2ad1 libpod create and run
patched version of the same code that went into crio

Signed-off-by: baude <bbaude@redhat.com>
2017-11-01 14:19:19 -05:00