summaryrefslogtreecommitdiff
path: root/libpod/container.go
Commit message (Collapse)AuthorAge
* Save ContainerConfig.User to databaseMatthew Heon2018-01-08
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #194 Approved by: rhatdan
* Add function to get IP address of a running containerMatthew Heon2018-01-08
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #192 Approved by: rhatdan
* Fix handling of exit codesDaniel J Walsh2018-01-04
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #183 Approved by: TomSweeneyRedHat
* Make database write in syncContainer conditionalMatthew Heon2018-01-04
| | | | | | | | | | This should help with performance when executing many operations on a single container Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #185 Approved by: rhatdan
* podman create/run need to load information from the imageDaniel J Walsh2018-01-03
| | | | | | | | | | We should be pulling information out of the image to set the defaults to use when setting up the container. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #110 Approved by: mheon
* libpod/container.go Handle systemd resolvebaude2018-01-02
| | | | | | | | | | | In cases, like Ubuntu, where it uses systemd resolve for DNS then do not copy /etc/resolv.conf but instead the resolv.conf in the systemd resolve /run dir. Signed-off-by: baude <bbaude@redhat.com> Closes: #177 Approved by: rhatdan
* Plumb through the --stop-timeout signal handlingDaniel J Walsh2017-12-20
| | | | | | | | | | | | | podman run/create have the ability to set the stop timeout flag. We need to stop it in the database. Also Allowing negative time for stop timeout makes no sense, so switching to timeout of uint, allows user to specify huge timeout values. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #158 Approved by: TomSweeneyRedHat
* Add podman commit commandumohnani82017-12-20
| | | | | | | | | | | | podman commit allows the user to commit containers as images with options of tagging th image, setting a commit message, setting the auther, and making changes to the instructions. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #143 Approved by: rhatdan
* Create new network namespaces when initializing containersMatthew Heon2017-12-14
| | | | | | | | | Also fix a few lingering lint issues Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
* Add network namespaces to SQL stateMatthew Heon2017-12-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
* Add networking configuration to the libpod DBMatthew Heon2017-12-14
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #109 Approved by: mheon
* Remove lock existence checks when creating pods/containersMatthew Heon2017-12-14
| | | | | | | | | | | | | | Given that we don't have a good way of cleaning up locks, these could potential cause issues if we ever reuse a container or pod ID Also changes locks dir to use tmpfs, as we can't directly clean up locks Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #138 Approved by: rhatdan
* Copy resolv.conf into containerbaude2017-12-14
| | | | | | | | | | | For DNS to work properly, we need to copy the host's /etc/resolv.conf into the container during Init(). We do this by copying it into the containers rundir and then bind mounting it into the container. Signed-off-by: baude <bbaude@redhat.com> Closes: #130 Approved by: baude
* kpod statsbaude2017-12-13
| | | | | | | | | Move kpod stats to the libpod backend. Signed-off-by: baude <bbaude@redhat.com> Closes: #113 Approved by: baude
* Update kpod inspect to use the new container stateumohnani82017-12-12
| | | | | | | | | kpod inspect now uses the new libpod container state and closely matches the output of docker inspect some aspects of it are still WIP as the libpod container state is still being worked on Signed-off-by: umohnani8 <umohnani@redhat.com>
* Merge pull request #72 from mheon/file_lockingDaniel J Walsh2017-12-11
|\ | | | | Move containers to file locks from c/storage
| * Small comment update to make use of syncContainer more obviousMatthew Heon2017-12-05
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * Fix lintMatthew Heon2017-12-04
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * Remove SQL state locking and rely on sqlite lockingMatthew Heon2017-12-04
| | | | | | | | | | | | | | Also renames some parameters from locksDir -> lockDir for consistency. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * Move containers to file locks from c/storageMatthew Heon2017-12-04
| | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | Merge pull request #94 from mheon/restartDaniel J Walsh2017-12-11
|\ \ | | | | | | Add handling for system restart in libpod
| * | Add ability to refresh state in DBMatthew Heon2017-12-07
| | | | | | | | | | | | | | | | | | | | | Also, ensure we always recreate runtime spec so our net namespace paths will be correct Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * | Do not recreate containers in runc after restartMatthew Heon2017-12-06
| | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * | Do not recreate OCI spec in init() if it existsMatthew Heon2017-12-05
| | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * | Fix potential race condition in initializing libpodMatthew Heon2017-12-04
| | | | | | | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
| * | Add handling for system restart in libpodMatthew Heon2017-12-04
| |/ | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* | kpod execbaude2017-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial wiring of kpod exec. We wont support the following options for exec: * detach -- unsure of use case * detach-keys -- not supported by runc * interactive -- all terminals will be interactive Not adding exec tests as we need to think about how to support a test that requires console access but our CI tests have no console. Signed-off-by: baude <bbaude@redhat.com>
* | Add Artifacts directory to containersumohnani82017-12-07
|/ | | | | | | | | | | | | Create an artifacts directory in the container's static directory so store container information coming from outside of libpod to specified files An example is to hold data from user specified flags in kpod run/create such as --cap-add, --ipcMode, etc... Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #108 Approved by: mheon
* Consolidate mount logicMatthew Heon2017-12-04
| | | | | | | | | | | There are still two places that don't use the new function, export and mount, but both can probably be converted to it in the future. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #99 Approved by: rhatdan
* You can only attach to running containersDaniel J Walsh2017-12-04
| | | | | | | Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #98 Approved by: mheon
* Add NetMode, UTSMode and IPCModeDaniel J Walsh2017-12-02
| | | | | | | | | | | | | | Allow kpod create/run to create contianers in different network namespaces, uts namespaces and IPC Namespaces. This patch just handles the simple join the host, or another containers namespaces. Lots more work needed to full integrate --net Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #64 Approved by: mheon
* Add randomly generates container namesMatthew Heon2017-11-30
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #88 Approved by: baude
* Change location of created runc specs to make them survive rebootMatthew Heon2017-11-29
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #78 Approved by: rhatdan
* First pass at fixing test errorsMatthew Heon2017-11-29
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
* Fix comment on container.Stop()Matthew Heon2017-11-29
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
* Add ability to kill and stop containersMatthew Heon2017-11-29
| | | | | | | | | | | | | | Also migrates kpod kill and kpod stop to libpod to use the new code Fixes force removing containers, and actually deletes containers in runc when removing them Start is now capable of starting even when the container is unmounted Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
* kpod psbaude2017-11-28
| | | | | | | | | Wire up kpod ps with the new libpod container backend. Signed-off-by: baude <bbaude@redhat.com> Closes: #67 Approved by: rhatdan
* kpod_waitbaude2017-11-27
| | | | | | | | | Convert to libpod container backend Signed-off-by: baude <bbaude@redhat.com> Closes: #70 Approved by: rhatdan
* Update kpod pause and unpause to use new container stateumohnani82017-11-24
| | | | | | | Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #66 Approved by: mheon
* Update kpod mount and umount to use the new stateumohnani82017-11-22
| | | | | | | | | | The new state for containers has been added moved kpod mount and umount over to use it Signed-off-by: Urvashi Mohnani <umohnani@redhat.com> Closes: #57 Approved by: rhatdan
* Order containers returned from state and make container config publicMatthew Heon2017-11-22
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #63 Approved by: baude
* Update kpod export to use the new container state and runtimeUrvashi Mohnani2017-11-22
| | | | | | | Signed-off-by: Urvashi Mohnani <umohnani@redhat.com> Closes: #59 Approved by: rhatdan
* Add ability to retrieve container's log path to APIMatthew Heon2017-11-21
| | | | | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #56 Approved by: rhatdan
* Add ability to update container status from runcMatthew Heon2017-11-21
| | | | | | | | | | | | Wire this in to all state-bound container operations to ensure syncronization of container state. Also exposes PID of running containers via API. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #56 Approved by: rhatdan
* Add tests for SQL-backed state implMatthew Heon2017-11-20
| | | | | | | Minor changes to container.go and sql_state.go to fix issues identified by the tests Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Rename Create to Init for containers to be less confusingMatthew Heon2017-11-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Wire SQL backed state into rest of libpodMatthew Heon2017-11-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Address review comments, fix gofmt and lintMatthew Heon2017-11-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Compile-tested implementation of SQL-backed stateMatthew Heon2017-11-18
| | | | Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
* Enhancements to papr testsbaude2017-11-17
| | | | | | | | | | | | | | | The PR contains several enhancements to our CI testing. - enable lint testing on Fedora - add Centos Atomic as test platform - integration tests on run on the OS natively (uncontainerized) - builds are done in containers - inclusion of Vagrant file for local testing Signed-off-by: baude <bbaude@redhat.com> Closes: #18 Approved by: mheon