You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A wrapper for buildah(1) commands. Create OCI containers in Lua instead of Dockerfile, Containerfile instructions or shell scripts. With buildah you have built-in layer squashing, faster builds, daemon-less operation, and capability for regular(non-root) users to create containers among other things. This wrapper also has useful abstractions such as removing whole toolchains from the container’s filesystem like Alpine apk-tools and Debian apt/dpkg.
A DSL module for LadyLua.
Lint and formatting
You can use selene and stylua for linting and formatting your code. A selene configuration is bundled with buildah.lua.
Sample
Check the sample directory in the repo for a sample of a non-trivial Dockerfile converted to Lua.
DSL
Besides the documented commands below, this DSL module also has a string interpolation extension.
Amount of time to wait after starting a container before a failed health check counts as a failure
healthcheck-timeout
Maximum time to wait for health check command
HOSTNAME
Host name
LABEL
Labels
OS
Operating system
PORT
Ports to expose
SHELL
Shell
STOP-SIGNAL
Signal e.g. SIGTERM
USER
Default user
VOLUME
Volume
/home/e
WORKINGDIR
Default working directory
Example
CONFIG.ENV = "PATH=/usr/bin"
ENTRYPOINT (…)
Apply --entrypoint and --stop-signal in one instruction.
stop-signal is SIGTERM.
Arguments
Required
Type
Description
Default
Example
Yes
varargs
Sequence of executable arguments
"/sbin/tini", "--", "/usr/local/bin/jenkins.sh"
COMMIT (NAME)
Writes the container into local containers-storage. Finalizes and deletes the container being worked on.
Arguments
Required
Type
Description
Default
Example
Yes
string
Name and tag
alpine:new
PUSH (NAME, URL)
Push container image from containers-storage to URL, usually a container repository. Credentials are taken from environment variables BUILDAH_USER and BUILDAH_PASS.
Arguments
Required
Type
Description
Default
Example
Yes
string
Name
alpine:edge
Yes
string
URL
docker://example.com/alpine:edge
ARCHIVE (PATH)
Create an OCI archive of the container. Finalizes and deletes the container being worked on.
Arguments
Required
Type
Description
Default
Example
Yes
string
Destination path for archive
DIR (PATH)
Writes contents of OCI image into directory. Finalizes and deletes the container being worked on.
Arguments
Required
Type
Description
Default
Example
Yes
string
Destination path
TAR (PATH)
Writes contents of container root directory to a TAR file.
Arguments
Required
Type
Description
Default
Example
Yes
string
Destination path
PURGE (OPTION)
Purges a set of files and directories from the container.
Arguments
Required
Type
Description
Default
Example
Yes
string
See below
Option
String
Description
deb
apt and dpkg toolchain from Debian-based images
perl
Perl
apk
apk toolchain from Alpine Linux images
userland
common Linux userland
About
[container] buildah wrapper. Write your Dockerfile in Lua.