No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
sudo podman run -it fedora echo Hello-World | sudo podman run -it fedora echo Hello-World | ||
= | = Create a container from Dockerfile = | ||
For this test you can install the Fedora dockerfiles package (rpm-ostree install fedora-dockerfiles) or use the example dockerfile below: | For this test you can install the Fedora dockerfiles package (rpm-ostree install fedora-dockerfiles) or use the example dockerfile below: | ||
<pre> | <pre> | ||
Line 38: | Line 38: | ||
sudo podman run -d -p 80:80 localhost/f29-httpd | sudo podman run -d -p 80:80 localhost/f29-httpd | ||
Verify the container is running | |||
sudo podman container ls | |||
Test apache is working, this should display the Test page html. | Test apache is working, this should display the Test page html. | ||
curl http://localhost/ | curl http://localhost/ | ||
Open a web browser and test the page is visible. | Open a web browser on another computer and enter the IP address to test the page is visible. | ||
= Results= | = Results= |
Revision as of 02:50, 13 March 2019
Description
A simple validation test case for Podman on Fedora IoT Edition.
Setup
This testcase can be run on either an image or installation, on hardware or in virtualization.
How to test
Boot image or Installation and log in locally or SSH into booted image.
Check if podman is installed
rpm -q podman
Check to see if you can pull an image from the registry
sudo podman pull fedora
Run hello-world to test.
sudo podman run -it fedora echo Hello-World
Create a container from Dockerfile
For this test you can install the Fedora dockerfiles package (rpm-ostree install fedora-dockerfiles) or use the example dockerfile below:
cat << EOF >> Dockerfile FROM fedora:latest RUN /usr/bin/dnf install -y httpd EXPOSE 80 CMD ["-D", "FOREGROUND"] ENTRYPOINT ["/usr/sbin/httpd"] EOF
Build an image
sudo podman build -t f29-httpd $(pwd)
Verify the image
sudo podman images
Run the container
sudo podman run -d -p 80:80 localhost/f29-httpd
Verify the container is running
sudo podman container ls
Test apache is working, this should display the Test page html.
curl http://localhost/
Open a web browser on another computer and enter the IP address to test the page is visible.
Results
- Latest image pulled successfully from the Registry
- podman is installed
- Hello World is displayed
- Image booted to a bash shell
- Custom container created, httpd test page visible on a browser or using curl.