From aa4aecdc7ed9847c2feb5a8f733e053006f3be51 Mon Sep 17 00:00:00 2001 From: Robert Sturla Date: Thu, 29 Feb 2024 19:49:12 +0000 Subject: [PATCH] chore: remove dnf cache and unused files from built image (#26) * chore: add a `dnf clean all` step after installing deps * chore: only copy the required files to the image * fix: add scripts to the image * Switch to .dockerignore file --------- Co-authored-by: Noel Miller <4983138+noelmiller@users.noreply.github.com> --- .dockerignore | 5 +++++ Containerfile | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..ed990215 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.devcontainer +.git* +*.md +action.yml +LICENSE diff --git a/Containerfile b/Containerfile index e0be3962..00708e08 100644 --- a/Containerfile +++ b/Containerfile @@ -16,10 +16,12 @@ ENV WEB_UI="false" ENV SECURE_BOOT_KEY_URL="" ENV ENROLLMENT_PASSWORD="ublue-os" -COPY / /isogenerator +COPY ./ /isogenerator WORKDIR /isogenerator -RUN dnf install -y make && make install-deps +RUN dnf install -y make && \ + make install-deps && \ + dnf clean all VOLUME /isogenerator/output