mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Update docs to build a runc that works with systemd
Runc disables systemd cgroup support when build statically, so don't tell people to do that now that we're defaulting to systemd for cgroup management. Also, fix some error messages to use the proper ID() call for containers. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -85,7 +85,7 @@ $ sudo cp bin/* /usr/libexec/cni
|
|||||||
```console
|
```console
|
||||||
$ git clone https://github.com/opencontainers/runc.git $GOPATH/src/github.com/opencontainers/runc
|
$ git clone https://github.com/opencontainers/runc.git $GOPATH/src/github.com/opencontainers/runc
|
||||||
$ cd $GOPATH/src/github.com/opencontainers/runc
|
$ cd $GOPATH/src/github.com/opencontainers/runc
|
||||||
$ make static BUILDTAGS="seccomp selinux"
|
$ make BUILDTAGS="seccomp"
|
||||||
$ sudo cp runc /usr/bin/runc
|
$ sudo cp runc /usr/bin/runc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ apt-get install -y \
|
|||||||
|
|
||||||
Debian, Ubuntu, and related distributions will also need to do the following setup:
|
Debian, Ubuntu, and related distributions will also need to do the following setup:
|
||||||
|
|
||||||
* A copy of the development libraries for `ostree`, either in the form of the `libostree-dev` package from the [flatpak](https://launchpad.net/~alexlarsson/+archive/ubuntu/flatpak) PPA, or built [from source](https://github.com/ostreedev/ostree) (more on that [here](https://ostree.readthedocs.io/en/latest/#building)).
|
* A copy of the development libraries for `ostree`, either in the form of the `libostree-dev` package from the [flatpak](https://launchpad.net/~alexlarsson/+archive/ubuntu/flatpak) PPA, or built [from source](https://github.com/ostreedev/ostree) (more on that [here](https://ostree.readthedocs.io/en/latest/#building)). As of Ubuntu 18.04, `libostree-dev` is available in the main repositories, and the PPA is no longer required.
|
||||||
* [Add required configuration files](https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md#adding-required-configuration-files)
|
* [Add required configuration files](https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md#adding-required-configuration-files)
|
||||||
* Install conmon, CNI plugins and runc
|
* Install conmon, CNI plugins and runc
|
||||||
* [Install conmon](https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md#building-and-installing-conmon)
|
* [Install conmon](https://github.com/containers/libpod/blob/master/docs/tutorials/podman_tutorial.md#building-and-installing-conmon)
|
||||||
|
@ -927,7 +927,7 @@ func (c *Container) makeBindMounts() error {
|
|||||||
return errors.Wrapf(err, "error creating resolv.conf for container %s", c.ID())
|
return errors.Wrapf(err, "error creating resolv.conf for container %s", c.ID())
|
||||||
}
|
}
|
||||||
if err = label.Relabel(newResolv, c.config.MountLabel, false); err != nil {
|
if err = label.Relabel(newResolv, c.config.MountLabel, false); err != nil {
|
||||||
return errors.Wrapf(err, "error relabeling %q for container %q", newResolv, c.ID)
|
return errors.Wrapf(err, "error relabeling %q for container %q", newResolv, c.ID())
|
||||||
}
|
}
|
||||||
c.state.BindMounts["/etc/resolv.conf"] = newResolv
|
c.state.BindMounts["/etc/resolv.conf"] = newResolv
|
||||||
|
|
||||||
@ -941,7 +941,7 @@ func (c *Container) makeBindMounts() error {
|
|||||||
return errors.Wrapf(err, "error creating hosts file for container %s", c.ID())
|
return errors.Wrapf(err, "error creating hosts file for container %s", c.ID())
|
||||||
}
|
}
|
||||||
if err = label.Relabel(newHosts, c.config.MountLabel, false); err != nil {
|
if err = label.Relabel(newHosts, c.config.MountLabel, false); err != nil {
|
||||||
return errors.Wrapf(err, "error relabeling %q for container %q", newHosts, c.ID)
|
return errors.Wrapf(err, "error relabeling %q for container %q", newHosts, c.ID())
|
||||||
}
|
}
|
||||||
c.state.BindMounts["/etc/hosts"] = newHosts
|
c.state.BindMounts["/etc/hosts"] = newHosts
|
||||||
|
|
||||||
@ -953,7 +953,7 @@ func (c *Container) makeBindMounts() error {
|
|||||||
return errors.Wrapf(err, "error creating hostname file for container %s", c.ID())
|
return errors.Wrapf(err, "error creating hostname file for container %s", c.ID())
|
||||||
}
|
}
|
||||||
if err = label.Relabel(hostnamePath, c.config.MountLabel, false); err != nil {
|
if err = label.Relabel(hostnamePath, c.config.MountLabel, false); err != nil {
|
||||||
return errors.Wrapf(err, "error relabeling %q for container %q", hostnamePath, c.ID)
|
return errors.Wrapf(err, "error relabeling %q for container %q", hostnamePath, c.ID())
|
||||||
}
|
}
|
||||||
c.state.BindMounts["/etc/hostname"] = hostnamePath
|
c.state.BindMounts["/etc/hostname"] = hostnamePath
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user