diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | docs/tutorials/rootless_tutorial.md | 2 | ||||
-rw-r--r-- | install.md | 2 | ||||
-rw-r--r-- | libpod.conf | 7 | ||||
-rw-r--r-- | libpod/container_internal.go | 2 | ||||
-rw-r--r-- | libpod/container_internal_linux.go | 4 | ||||
-rw-r--r-- | libpod/pod_internal.go | 2 | ||||
-rw-r--r-- | libpod/runtime.go | 2 | ||||
-rw-r--r-- | test/e2e/run_networking_test.go | 6 |
9 files changed, 25 insertions, 6 deletions
@@ -15,8 +15,8 @@ At a high level, the scope of libpod and Podman is the following: * Support multiple image formats including the OCI and Docker image formats. * Support for multiple means to download images including trust & image verification. * Container image management (managing image layers, overlay filesystems, etc). -* Full management of container lifecycle -* Support for pods to manage groups of containers together +* Full management of container lifecycle. +* Support for pods to manage groups of containers together. * Resource isolation of containers and pods. * Support for a Docker-compatible CLI interface through Podman. * Integration with CRI-O to share containers and backend code. diff --git a/docs/tutorials/rootless_tutorial.md b/docs/tutorials/rootless_tutorial.md index a32c1f15b..553e8d297 100644 --- a/docs/tutorials/rootless_tutorial.md +++ b/docs/tutorials/rootless_tutorial.md @@ -76,7 +76,7 @@ Once the Administrator has completed the setup on the machine and then the confi ### User Configuration Files. -The Podman configuration files for root reside in /etc/containers. In the rootless environment they reside in ${XDG_RUNTIME_DIR}/containers and are owned by each individual user. The user can modify these files as they wish. +The Podman configuration files for root reside in /etc/containers. In the rootless environment they reside in ${HOME}/.config/containers and are owned by each individual user. The user can modify these files as they wish. ## More information diff --git a/install.md b/install.md index 4b2c5a119..43eddf1cc 100644 --- a/install.md +++ b/install.md @@ -193,7 +193,7 @@ To build from source, use the following: git clone https://github.com/containers/conmon cd conmon make -sudo install -D -m 755 bin/conmon /usr/libexec/podman/conmon +sudo make podman ``` #### runc diff --git a/libpod.conf b/libpod.conf index 45e955c36..32f7a56ae 100644 --- a/libpod.conf +++ b/libpod.conf @@ -12,6 +12,8 @@ conmon_path = [ "/usr/local/libexec/crio/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", + "/usr/local/bin/conmon", + "/usr/local/sbin/conmon", "/usr/lib/podman/bin/conmon", "/usr/lib/crio/bin/conmon" ] @@ -122,6 +124,11 @@ runc = [ "/usr/lib/cri-o-runc/sbin/runc" ] +crun = [ + "/usr/bin/crun", + "/usr/local/bin/crun", +] + # The [runtimes] table MUST be the last thing in this file. # (Unless another table is added) # TOML does not provide a way to end a table other than a further table being diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 3e2fd0c44..56fd27afb 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -509,7 +509,7 @@ func (c *Container) refresh() error { // We need to pick up a new lock lock, err := c.runtime.lockManager.AllocateAndRetrieveLock(c.config.LockID) if err != nil { - return errors.Wrapf(err, "error acquiring lock for container %s", c.ID()) + return errors.Wrapf(err, "error acquiring lock %d for container %s", c.config.LockID, c.ID()) } c.lock = lock diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 60633e58c..50a2e2d44 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1069,6 +1069,10 @@ func (c *Container) getHosts() string { hosts += fmt.Sprintf("%s %s\n", fields[1], fields[0]) } } + if c.config.NetMode.IsSlirp4netns() { + // When using slirp4netns, the interface gets a static IP + hosts += fmt.Sprintf("# used by slirp4netns\n%s\t%s\n", "10.0.2.100", c.Hostname()) + } if len(c.state.NetworkStatus) > 0 && len(c.state.NetworkStatus[0].IPs) > 0 { ipAddress := strings.Split(c.state.NetworkStatus[0].IPs[0].Address.String(), "/")[0] hosts += fmt.Sprintf("%s\t%s\n", ipAddress, c.Hostname()) diff --git a/libpod/pod_internal.go b/libpod/pod_internal.go index 1fcb5b1a6..23359d841 100644 --- a/libpod/pod_internal.go +++ b/libpod/pod_internal.go @@ -58,7 +58,7 @@ func (p *Pod) refresh() error { // Retrieve the pod's lock lock, err := p.runtime.lockManager.AllocateAndRetrieveLock(p.config.LockID) if err != nil { - return errors.Wrapf(err, "error retrieving lock for pod %s", p.ID()) + return errors.Wrapf(err, "error retrieving lock %d for pod %s", p.config.LockID, p.ID()) } p.lock = lock diff --git a/libpod/runtime.go b/libpod/runtime.go index d4d34242c..78fa22ec8 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -291,6 +291,8 @@ func defaultRuntimeConfig() (RuntimeConfig, error) { "/usr/local/libexec/crio/conmon", "/usr/bin/conmon", "/usr/sbin/conmon", + "/usr/local/bin/conmon", + "/usr/local/sbin/conmon", "/usr/lib/crio/bin/conmon", }, ConmonEnvVars: []string{ diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 1497a651b..31291d373 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -178,6 +178,12 @@ var _ = Describe("Podman run networking", func() { Expect(exec4.OutputToString()).To(ContainSubstring("192.0.2.2 test1")) }) + It("podman run /etc/hosts contains --hostname", func() { + session := podmanTest.Podman([]string{"run", "--rm", "--hostname", "foohostname", ALPINE, "grep", "foohostname", "/etc/hosts"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman run network in user created network namespace", func() { SkipIfRootless() if Containerized() { |