From 4e3898b34a5dbcfabbcf861998d915c261831b60 Mon Sep 17 00:00:00 2001
From: Johannes Stoelp <johannes.stoelp@gmail.com>
Date: Tue, 21 Nov 2023 00:28:03 +0100
Subject: add comment to either use podman or docker

---
 README.md            | 14 ++++++++++++--
 container/Dockerfile | 19 +++++++++++++++++++
 container/Makefile   |  5 +++++
 docker/Dockerfile    | 19 -------------------
 docker/Makefile      |  2 --
 5 files changed, 36 insertions(+), 23 deletions(-)
 create mode 100644 container/Dockerfile
 create mode 100644 container/Makefile
 delete mode 100644 docker/Dockerfile
 delete mode 100644 docker/Makefile

diff --git a/README.md b/README.md
index 9bd0eda..55eec94 100644
--- a/README.md
+++ b/README.md
@@ -61,16 +61,26 @@ Rustdoc for this crate is available at
 
 ## Build with provided container file
 
-The provided [Dockerfile](docker/Dockerfile) documents the required
+The provided [Dockerfile](container/Dockerfile) documents the required
 dependencies for an ubuntu based system and serves as a build environment with
 the correct llvm version as specified in the [Cargo.toml](Cargo.toml) file.
 
 ```bash
+## Either user podman ..
+
 # Build the image *ks-rs*. Depending on the downlink this may take some minutes.
-make -C docker
+make -C container
 
 podman run --rm -it -v $PWD:/work -w /work ks-rs
 # Drops into a shell in the container, just use cargo build / run ...
+
+## .. or docker.
+
+# Build the image *ks-rs*. Depending on the downlink this may take some minutes.
+make -C container docker
+
+docker run --rm -it -v $PWD:/work -w /work ks-rs
+# Drops into a shell in the container, just use cargo build / run ...
 ```
 
 ## License
diff --git a/container/Dockerfile b/container/Dockerfile
new file mode 100644
index 0000000..9cb8b44
--- /dev/null
+++ b/container/Dockerfile
@@ -0,0 +1,19 @@
+FROM ubuntu
+
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive \
+    apt install \
+      --yes \
+      --no-install-recommends \
+      ca-certificates \
+      build-essential \
+      cargo \
+      llvm-15 \
+      llvm-15-dev \
+      # For polly dependency.
+      # https://gitlab.com/taricorp/llvm-sys.rs/-/issues/13
+      libclang-common-15-dev \
+      zlib1g-dev \
+      && \
+    rm -rf /var/lib/apt/lists/* && \
+    apt-get clean
diff --git a/container/Makefile b/container/Makefile
new file mode 100644
index 0000000..26f7493
--- /dev/null
+++ b/container/Makefile
@@ -0,0 +1,5 @@
+podman: build-podman
+docker: build-docker
+
+build-%:
+	$* build -t ks-rs .
diff --git a/docker/Dockerfile b/docker/Dockerfile
deleted file mode 100644
index 9cb8b44..0000000
--- a/docker/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-FROM ubuntu
-
-RUN apt update && \
-    DEBIAN_FRONTEND=noninteractive \
-    apt install \
-      --yes \
-      --no-install-recommends \
-      ca-certificates \
-      build-essential \
-      cargo \
-      llvm-15 \
-      llvm-15-dev \
-      # For polly dependency.
-      # https://gitlab.com/taricorp/llvm-sys.rs/-/issues/13
-      libclang-common-15-dev \
-      zlib1g-dev \
-      && \
-    rm -rf /var/lib/apt/lists/* && \
-    apt-get clean
diff --git a/docker/Makefile b/docker/Makefile
deleted file mode 100644
index 6b3ef8b..0000000
--- a/docker/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-build:
-	podman build -t ks-rs .
-- 
cgit v1.2.3