diff --git a/Dockerfile b/Dockerfile index af50c923..8df2a3a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,12 +41,4 @@ RUN dnf install -y binutils mtools efitools shim openssl dosfstools xorriso rsyn COPY --from=builder /enki /enki -ENTRYPOINT ["/enki"] - -FROM gcr.io/kaniko-project/executor:latest - -COPY --from=builder /enki /enki - -ENTRYPOINT ["/enki"] - -CMD ["convert"] +ENTRYPOINT ["/enki"] \ No newline at end of file diff --git a/Earthfile b/Earthfile index 39c9f8f8..e9184048 100644 --- a/Earthfile +++ b/Earthfile @@ -4,14 +4,13 @@ VERSION 0.7 ARG --global GO_VERSION=1.22-bookworm enki-image: - FROM DOCKERFILE -f e2e/assets/Dockerfile.enki e2e/assets/ + FROM DOCKERFILE -f Dockerfile . SAVE IMAGE enki-image go-deps: ARG GO_VERSION FROM golang:$GO_VERSION - RUN apt-get update && apt-get install -y rsync gcc bash git jq docker WORKDIR /build COPY go.mod go.sum . # This will make the go mod download able to be cached as long as it hasnt change RUN go mod download diff --git a/e2e/assets/Dockerfile.enki b/e2e/assets/Dockerfile.enki deleted file mode 100644 index 487f1024..00000000 --- a/e2e/assets/Dockerfile.enki +++ /dev/null @@ -1,21 +0,0 @@ -# A docker images suitable to run `enki build-uki` in it -ARG LUET_VERSION=0.35.2 - -FROM quay.io/luet/base:$LUET_VERSION AS luet - -FROM fedora:39 -COPY --from=luet /usr/bin/luet /usr/bin/luet -ENV LUET_NOLOCK=true -ENV TMPDIR=/tmp -ARG TARGETARCH -# copy both arches -COPY luet-arm64.yaml /tmp/luet-arm64.yaml -COPY luet-amd64.yaml /tmp/luet-amd64.yaml -# Set the default luet config to the current build arch -RUN mkdir -p /etc/luet/ -RUN cp /tmp/luet-${TARGETARCH}.yaml /etc/luet/luet.yaml -## Uki artifacts, will be set under the /usr/kairos directory -## We can install both arches, as the artifacts are named differently -RUN luet install --config /tmp/luet-amd64.yaml -y system/systemd-boot -RUN luet install --config /tmp/luet-arm64.yaml -y system/systemd-boot -RUN dnf install -y binutils mtools efitools shim openssl dosfstools mtools xorriso diff --git a/e2e/assets/luet-amd64.yaml b/e2e/assets/luet-amd64.yaml deleted file mode 100644 index 2927252f..00000000 --- a/e2e/assets/luet-amd64.yaml +++ /dev/null @@ -1,16 +0,0 @@ -general: - debug: false - spinner_charset: 9 -logging: - enable_emoji: false -repositories: - - name: "kairos" - description: "kairos repository" - type: "docker" - cached: true - enable: true - priority: 2 - urls: - - "quay.io/kairos/packages" - # renovate: datasource=docker depName=quay.io/kairos/packages - reference: 202406241518-git2d546411-repository.yaml diff --git a/e2e/assets/luet-arm64.yaml b/e2e/assets/luet-arm64.yaml deleted file mode 100644 index 476513f6..00000000 --- a/e2e/assets/luet-arm64.yaml +++ /dev/null @@ -1,16 +0,0 @@ -general: - debug: false - spinner_charset: 9 -logging: - enable_emoji: false -repositories: - - name: "kairos-arm64" - description: "kairos repository arm64" - type: "docker" - cached: true - enable: true - priority: 2 - urls: - - "quay.io/kairos/packages-arm64" - # renovate: datasource=docker depName=quay.io/kairos/packages-arm64 - reference: 202406241600-git2d546411-repository.yaml diff --git a/e2e/suite_test.go b/e2e/suite_test.go index d1e3d504..d9694434 100644 --- a/e2e/suite_test.go +++ b/e2e/suite_test.go @@ -27,9 +27,7 @@ func NewEnki(image string, dirs ...string) *Enki { tmpDir, err := os.MkdirTemp("", "enki-e2e-tmp") Expect(err).ToNot(HaveOccurred()) enkiBinary := path.Join(tmpDir, "enki") - compileEnki(enkiBinary) - return &Enki{ContainerImage: image, Path: enkiBinary, Dirs: dirs} } @@ -37,7 +35,7 @@ func NewEnki(image string, dirs ...string) *Enki { // are in place (or to test the behavior of enki when they are not), we run enki // in a container using this function. func (e *Enki) Run(enkiArgs ...string) (string, error) { - return e.ContainerRun("/bin/enki", enkiArgs...) + return e.ContainerRun(e.Path, enkiArgs...) } // We need --privileged for `mount` to work in the container (used in the build_uki_test.go).