diff mbox series

rteval: Add Dockerfile README

Message ID 20240123191810.107-1-chwhite@redhat.com
State New
Headers show
Series rteval: Add Dockerfile README | expand

Commit Message

Chris White Jan. 23, 2024, 7:18 p.m. UTC
Add README.md for Docker setup, covering build and test instructions
in a containerized environment.

Signed-off-by: Chris White <chwhite@redhat.com>
---
 README-Dockerfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 README-Dockerfile

Comments

John Kacur Jan. 23, 2024, 8:36 p.m. UTC | #1
On Tue, 23 Jan 2024, Chris White wrote:

> Add README.md for Docker setup, covering build and test instructions
> in a containerized environment.
> 
> Signed-off-by: Chris White <chwhite@redhat.com>
> ---
>  README-Dockerfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 README-Dockerfile
> 
> diff --git a/README-Dockerfile b/README-Dockerfile
> new file mode 100644
> index 0000000..95da6d8
> --- /dev/null
> +++ b/README-Dockerfile
> @@ -0,0 +1,49 @@
> +
> +# README-Dockerfile-rteval
> +
> +## Introduction
> +This README provides detailed instructions for setting up an rteval container using Docker or Podman. This Dockerfile is designed to pull the latest local copy of your code, along with any modifications you've made, and compile it into a container image for testing purposes. This approach offers an OS-agnostic method for testing your changes, suitable for semi-modern host operating systems. The containerized environment of rteval ensures consistent and reproducible test results across different systems.
> +
> +## Prerequisites
> +- Docker or Podman installed on your system.
> +
> +## Installation
> +### Prepare Your Environment
> +- For EPEL systems (Fedora, CentOS, RHEL):
> +  - Install Podman: `sudo dnf install podman -y`
> +- For Debian-based systems (Ubuntu):
> +  - Install Docker: `sudo apt-get update && sudo apt-get install docker.io -y`
> +  - Alternatively, install Podman: `sudo apt-get update && sudo apt-get install podman -y`
> +
> +### Build the Container
> +- Navigate to the root directory of the 'rteval'
> +- Build the container image named 'rteval-upstream':
> +  - For Podman: `sudo podman build -t rteval-upstream .`
> +  - For Docker: `sudo docker build -t rteval-upstream .`
> +
> +## Usage
> +### Run the Container
> +- Start the container in privileged mode. This container will drop you directly into an interactive shell. Run the following command to start the container and drop into an interactive shell:
> +  - For Podman: `sudo podman run -it --privileged rteval-upstream`
> +  - For Docker: `sudo docker run -it --privileged rteval-upstream`
> +- This will create a long lasting container. In order to use it again (say after a reboot), you need to start and exec into the container to get yourself back into the shell:
> +  - For Podman: 
> +    - `sudo podman start rteval-upstream`
> +    - `sudo podman exec -it rteval-upstream /bin/bash`
> +  - For Docker: 
> +    - `sudo docker start rteval-upstream`
> +    - `sudo docker exec -it rteval-upstream /bin/bash`
> +- And to clean up and remove your container so you can test a new one:
> +  - For Podman: `sudo podman rm -f rteval-upstream`
> +  - For Docker: `sudo docker rm -f rteval-upstream`
> +- Please note that the above command does not cleanup the container when you are done. It can be useful to run a single use container when trying to only test a quick change and remove the container afterwards. To run a a single use container that removes itself immediately after you exit the shell, run the following commands with the `--rm` option:
> +  - For Podman: `sudo podman run -it --rm --privileged rteval-upstream`
> +  - For Docker: `sudo docker run -it --rm --privileged rteval-upstream`
> +  
> +
> +### Test rteval Build
> +- Inside the container, test the 'rteval' build:
> +  - Command: `rteval -d 1s`
> +
> +## Conclusion
> +Follow these detailed steps for a successful rteval container setup using Docker or Podman.
> -- 

Signed-off-by: John Kacur <jkacur@redhat.com>
diff mbox series

Patch

diff --git a/README-Dockerfile b/README-Dockerfile
new file mode 100644
index 0000000..95da6d8
--- /dev/null
+++ b/README-Dockerfile
@@ -0,0 +1,49 @@ 
+
+# README-Dockerfile-rteval
+
+## Introduction
+This README provides detailed instructions for setting up an rteval container using Docker or Podman. This Dockerfile is designed to pull the latest local copy of your code, along with any modifications you've made, and compile it into a container image for testing purposes. This approach offers an OS-agnostic method for testing your changes, suitable for semi-modern host operating systems. The containerized environment of rteval ensures consistent and reproducible test results across different systems.
+
+## Prerequisites
+- Docker or Podman installed on your system.
+
+## Installation
+### Prepare Your Environment
+- For EPEL systems (Fedora, CentOS, RHEL):
+  - Install Podman: `sudo dnf install podman -y`
+- For Debian-based systems (Ubuntu):
+  - Install Docker: `sudo apt-get update && sudo apt-get install docker.io -y`
+  - Alternatively, install Podman: `sudo apt-get update && sudo apt-get install podman -y`
+
+### Build the Container
+- Navigate to the root directory of the 'rteval'
+- Build the container image named 'rteval-upstream':
+  - For Podman: `sudo podman build -t rteval-upstream .`
+  - For Docker: `sudo docker build -t rteval-upstream .`
+
+## Usage
+### Run the Container
+- Start the container in privileged mode. This container will drop you directly into an interactive shell. Run the following command to start the container and drop into an interactive shell:
+  - For Podman: `sudo podman run -it --privileged rteval-upstream`
+  - For Docker: `sudo docker run -it --privileged rteval-upstream`
+- This will create a long lasting container. In order to use it again (say after a reboot), you need to start and exec into the container to get yourself back into the shell:
+  - For Podman: 
+    - `sudo podman start rteval-upstream`
+    - `sudo podman exec -it rteval-upstream /bin/bash`
+  - For Docker: 
+    - `sudo docker start rteval-upstream`
+    - `sudo docker exec -it rteval-upstream /bin/bash`
+- And to clean up and remove your container so you can test a new one:
+  - For Podman: `sudo podman rm -f rteval-upstream`
+  - For Docker: `sudo docker rm -f rteval-upstream`
+- Please note that the above command does not cleanup the container when you are done. It can be useful to run a single use container when trying to only test a quick change and remove the container afterwards. To run a a single use container that removes itself immediately after you exit the shell, run the following commands with the `--rm` option:
+  - For Podman: `sudo podman run -it --rm --privileged rteval-upstream`
+  - For Docker: `sudo docker run -it --rm --privileged rteval-upstream`
+  
+
+### Test rteval Build
+- Inside the container, test the 'rteval' build:
+  - Command: `rteval -d 1s`
+
+## Conclusion
+Follow these detailed steps for a successful rteval container setup using Docker or Podman.