From f17bfb937fd89ef3e4338e50ccc1e4c5436ec050 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 15 Sep 2017 15:53:31 -0400 Subject: [PATCH] examples: adding a basic lighttpd example Signed-off-by: Vincent Batts --- examples/lighttpd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 examples/lighttpd.sh diff --git a/examples/lighttpd.sh b/examples/lighttpd.sh new file mode 100755 index 00000000..7975ff99 --- /dev/null +++ b/examples/lighttpd.sh @@ -0,0 +1,17 @@ +#!/bin/bash -x + +ctr1=`buildah from ${1:-fedora}` + +## Get all updates and install our minimal httpd server +buildah run $ctr1 -- dnf update -y +buildah run $ctr1 -- dnf install -y lighttpd + +## Include some buildtime annotations +buildah config --annotation "com.example.build.host=$(uname -n)" $ctr1 + +## Run our server and expose the port +buildah config $ctr1 --cmd "/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf" +buildah config $ctr1 --port 80 + +## Commit this container to an image name +buildah commit $ctr1 ${2:-$USER/lighttpd}