From Fedora Project Wiki
(Rootless and privileged modes matrix) |
Sohank2602 (talk | contribs) m (Since `fcct` has recently been renamed to `butane` so changing the reference in this test case) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
|actions= | |actions= | ||
Run the following commands on the Fedora CoreOS machine: | |||
<ol> | <ol> | ||
<li>Using rootless `podman`, build ` | <li>Using rootless `podman`, build `butane` from a Dockerfile, which is the tool you've used to convert FCCs to Ignition configs. To do this: | ||
<pre> | <pre> | ||
git clone https://github.com/coreos/ | git clone https://github.com/coreos/butane /tmp/butane | ||
cd /tmp/ | cd /tmp/butane | ||
podman build -t rootless-test- | podman build -t rootless-test-butane . | ||
</pre> | </pre> | ||
<li> Try running the container, e.g. | <li> Try running the container, e.g.: | ||
<pre>podman run -ti --rm rootless-test-butane --help</pre> | |||
<li> Now try to build the same container, using privileged `podman`: | <li> Now try to build the same container, using privileged `podman`: | ||
<pre> | <pre> | ||
cd /tmp/ | cd /tmp/butane | ||
sudo podman build -t privileged-test- | sudo podman build -t privileged-test-butane . | ||
</pre> | </pre> | ||
<li> Try running the container, e.g. | <li> Try running the container, e.g.: | ||
<pre>sudo podman run -ti --rm privileged-test-butane --help</pre> | |||
<li> Now, use privileged `docker` to build the container. Note that this should be performed on a different fresh Fedora CoreOS machine since there are [https://docs.fedoraproject.org/en-US/fedora-coreos/faq/#_can_i_run_containers_via_docker_and_podman_at_the_same_time known conflicts between `podman` and `docker`]: | <li> Now, use privileged `docker` to build the container. Note that this should be performed on a different fresh Fedora CoreOS machine since there are [https://docs.fedoraproject.org/en-US/fedora-coreos/faq/#_can_i_run_containers_via_docker_and_podman_at_the_same_time known conflicts between `podman` and `docker`]: | ||
<pre> | <pre> | ||
git clone https://github.com/coreos/ | git clone https://github.com/coreos/butane /tmp/butane | ||
cd /tmp/ | cd /tmp/butane | ||
sudo docker build -t docker- | sudo docker build -t docker-butane . | ||
</pre> | </pre> | ||
<li> Try running the container, e.g. | <li> Try running the container, e.g.: | ||
<pre>sudo docker run -ti --rm docker-butane --help</pre> | |||
</ol> | </ol> | ||
Latest revision as of 14:43, 26 April 2021
Description
Install Fedora CoreOS and build and run containers.
Setup
- Have access to a (or install a new) FCOS instance running the next stream.
How to test
Run the following commands on the Fedora CoreOS machine:
- Using rootless
podman
, buildbutane
from a Dockerfile, which is the tool you've used to convert FCCs to Ignition configs. To do this:git clone https://github.com/coreos/butane /tmp/butane cd /tmp/butane podman build -t rootless-test-butane .
- Try running the container, e.g.:
podman run -ti --rm rootless-test-butane --help
- Now try to build the same container, using privileged
podman
:cd /tmp/butane sudo podman build -t privileged-test-butane .
- Try running the container, e.g.:
sudo podman run -ti --rm privileged-test-butane --help
- Now, use privileged
docker
to build the container. Note that this should be performed on a different fresh Fedora CoreOS machine since there are known conflicts betweenpodman
anddocker
:git clone https://github.com/coreos/butane /tmp/butane cd /tmp/butane sudo docker build -t docker-butane .
- Try running the container, e.g.:
sudo docker run -ti --rm docker-butane --help
Expected Results
- You can build a container using podman in rootless mode.
- You can run a built container using podman in rootless mode.
- You can build a container using podman in privileged mode.
- You can run a built container using podman in privileged mode.
- You can build a container using docker in privileged mode.
- You can run a built container using docker in privileged mode.
Optional
- If you're familiar with other containerized software, try building and running them too.