cert-manager/hack/containers/Containerfile.cainjector
Maël Valais c09dbb07e4 make: speed up 'docker build' with separate dir contexts
Previously, we had one .dockerignore that would do its best to only have
the binaries and licenses copied into the Docker (or nerdctl, or
buildah). Unfortunately, that meant it had to copy all of bin/server and
bin/cmctl, which could become quite large (I measured 1.6 GB).

Instead of relying on a single .dockerignore file, we copy the licenses
and binaries into a "scratch context" directory. The downside is that
all the binaries are in two different places (bin/server and
bin/scratch/containers). Note that we can't use symlinks because Docker
won't dereference them.

Signed-off-by: Maël Valais <mael@vls.dev>
2022-02-25 16:38:53 +01:00

14 lines
262 B
Docker

ARG BASE_IMAGE
FROM $BASE_IMAGE
USER 1000
COPY cainjector /app/cmd/cainjector/cainjector
COPY cert-manager.license /licenses/LICENSE
COPY cert-manager.licenses_notice /licenses/LICENSES
ENTRYPOINT ["/app/cmd/cainjector/cainjector"]
# vim: syntax=dockerfile