From Fedora Project Wiki
m (fixup git clone command to write output to /tmp/fcct/) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
|actions= | |actions= | ||
<ol> | <ol> | ||
− | <li>Using `podman`, build `fcct` from a Dockerfile, which is the tool you've used to convert FCCs to Ignition configs. To do this: | + | <li>Using rootless `podman`, build `fcct` 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/fcct | + | git clone https://github.com/coreos/fcct /tmp/fcct |
− | cd fcct | + | cd /tmp/fcct |
− | podman build -t fcct . | + | podman build -t rootless-test-fcct . |
</pre> | </pre> | ||
− | <li> Try running the container, e.g. | + | <li> Try running the container, e.g.: |
− | <li> Now | + | <pre>podman run -ti --rm rootless-test-fcct --help</pre> |
+ | <li> Now try to build the same container, using privileged `podman`: | ||
<pre> | <pre> | ||
− | + | cd /tmp/fcct | |
− | + | sudo podman build -t privileged-test-fcct . | |
− | |||
</pre> | </pre> | ||
− | <li> Try running the container, e.g. `docker run -ti --rm fcct --help | + | <li> Try running the container, e.g.: |
+ | <pre>sudo podman run -ti --rm privileged-test-fcct --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`]: | ||
+ | <pre> | ||
+ | git clone https://github.com/coreos/fcct /tmp/fcct | ||
+ | cd /tmp/fcct | ||
+ | sudo docker build -t docker-fcct . | ||
+ | </pre> | ||
+ | <li> Try running the container, e.g.: | ||
+ | <pre>sudo docker run -ti --rm docker-fcct --help</pre> | ||
</ol> | </ol> | ||
|results= | |results= | ||
− | # You can build a container using | + | # You can build a container using podman in rootless mode. |
− | # You can run a built container using | + | # 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= | |optional= |
Latest revision as of 14:29, 8 June 2020
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
- Using rootless
podman
, buildfcct
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/fcct /tmp/fcct cd /tmp/fcct podman build -t rootless-test-fcct .
- Try running the container, e.g.:
podman run -ti --rm rootless-test-fcct --help
- Now try to build the same container, using privileged
podman
:cd /tmp/fcct sudo podman build -t privileged-test-fcct .
- Try running the container, e.g.:
sudo podman run -ti --rm privileged-test-fcct --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/fcct /tmp/fcct cd /tmp/fcct sudo docker build -t docker-fcct .
- Try running the container, e.g.:
sudo docker run -ti --rm docker-fcct --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.