From 3def07f93b3375b2fde470734f2f32a2e2a21e02 Mon Sep 17 00:00:00 2001
From: bkioshn <bkioshn@gmail.com>
Date: Wed, 10 Apr 2024 17:16:14 +0700
Subject: [PATCH] fix: revert earthfile mithril

---
 earthly/mithril_snapshot/Earthfile | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/earthly/mithril_snapshot/Earthfile b/earthly/mithril_snapshot/Earthfile
index 51d45fce4..ffcf967ce 100644
--- a/earthly/mithril_snapshot/Earthfile
+++ b/earthly/mithril_snapshot/Earthfile
@@ -2,12 +2,18 @@ VERSION 0.8
 
 # cspell: words preprod
 
-base-snapshot-builder:
-    # Note: an official docker image is here, but it could not reliably pull from Earthly.
-    # It gives permission denied errors randomly.
-    # Image comes from: https://github.com/input-output-hk/mithril/pkgs/container/mithril-client
-    # FROM ghcr.io/input-output-hk/mithril-client:latest
-
-    # Build our own simple mithril client image
-    FROM debian:stable-20240408-slim
-    
\ No newline at end of file
+package-preprod-snapshot:
+    FROM alpine:3.19
+
+    WORKDIR /snapshot
+
+    RUN wget -O \
+        preprod.tar.zst \
+        https://storage.googleapis.com/cdn.aggregator.release-preprod.api.mithril.network/preprod-e135-i2625.80b0c02cd0c86c47a79a9b6d0d9b0e6936d5f621e8094ed53405fef3ee103a3b.tar.zst
+
+    # extract preprod archive
+    RUN apk add zstd
+    RUN zstd -d preprod.tar.zst && tar -xf preprod.tar
+    RUN rm preprod.tar && rm preprod.tar.zst
+
+    SAVE ARTIFACT /snapshot snapshot
\ No newline at end of file