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>
14 lines
262 B
Docker
14 lines
262 B
Docker
ARG BASE_IMAGE
|
|
|
|
FROM $BASE_IMAGE
|
|
|
|
USER 1000
|
|
|
|
COPY controller /app/cmd/controller/controller
|
|
COPY cert-manager.license /licenses/LICENSE
|
|
COPY cert-manager.licenses_notice /licenses/LICENSES
|
|
|
|
ENTRYPOINT ["/app/cmd/controller/controller"]
|
|
|
|
# vim: syntax=dockerfile
|