mirror of
https://github.com/containers/skopeo.git
synced 2026-02-01 06:51:21 +00:00
Merge pull request #261 from vbatts/example
examples: adding a basic lighttpd example
This commit is contained in:
17
examples/lighttpd.sh
Executable file
17
examples/lighttpd.sh
Executable file
@@ -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}
|
||||
Reference in New Issue
Block a user