Create simple BuildKit frontends with nearly zero effort
1.3K
This base image is a thin layer on top of a docker/dockerfile frontend.
It works by concatenating user-supplied Dockerfile with a pre-configured
header and footer. This enables you to create simple frontends with nearly
zero effort (and only requires knowledge of Dockerfile syntax).
Published from this GitHub repository.
Follow the steps below to create a frontend:
Dockerfile for your frontend with the following contents. Note
that header and/or footer can be omitted if not needed.FROM erichripko/simple-frontend
COPY header.Dockerfile footer.Dockerfile /
header.Dockerfile is prepended to the file in the
user's build context. See below for an example:FROM ubuntu
footer.Dockerfile will be appended to the file in the user's
build context. See below for an example:LABEL org.opencontainers.image.licenses="Apache-2.0"
docker build -t ubuntu-dockerfile .Dockerfile. Note that # syntax= is a special stanza that
instructs BuildKit to use a custom frontend. This should match the tag
specified by -t earlier.# syntax=ubuntu-dockerfile
RUN apt-get update && \
apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
Dockerfile is built, our frontend will concatenate it with the
header and footer we specified. This will result in the following
Dockerfile being used:FROM ubuntu
RUN apt-get update && \
apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
LABEL org.opencontainers.image.licenses="Apache-2.0"
That's it! If you'd like to see a complete ready example, check out examples directory in the source repository.
Content type
Image
Digest
sha256:ef8d04146…
Size
13.3 MB
Last updated
5 months ago
docker pull erichripko/simple-frontend