aboutsummaryrefslogtreecommitdiff
path: root/Earthfile
diff options
context:
space:
mode:
Diffstat (limited to 'Earthfile')
-rw-r--r--Earthfile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Earthfile b/Earthfile
index 0ff237d..14b43ac 100644
--- a/Earthfile
+++ b/Earthfile
@@ -3,15 +3,14 @@ VERSION 0.7
docker:
ARG tag=latest
- FROM gcr.io/distroless/static:nonroot
+ FROM scratch
WORKDIR /locus
COPY +build/locus .
COPY +build/content ./content
-
- # CBA
- USER root
+ # https://www.reddit.com/r/docker/comments/8y2zyx/how_to_add_a_empty_directory_to_a_scratch_image/e27oumn/
+ COPY +build/new_tmp /tmp
EXPOSE 1965
@@ -51,6 +50,9 @@ build:
cargo build --release --bin locus \
&& strip -s /source/locus/target/x86_64-unknown-linux-musl/release/locus \
&& mv /source/locus/target/x86_64-unknown-linux-musl/release/locus .
+ RUN strip -s /source/locus/locus
+ RUN mkdir /new_tmp
SAVE ARTIFACT /source/locus/locus
SAVE ARTIFACT /source/locus/content
+ SAVE ARTIFACT /new_tmp