summaryrefslogtreecommitdiff
path: root/examples/003
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-06-10 21:07:44 -0600
committermo khan <mo.khan@gmail.com>2020-06-10 21:07:44 -0600
commit0860d075d1a3e939ce1a6d4d9de96ea227333346 (patch)
treee3a8c918cdc9145761892e92f2a31397b53ca0bf /examples/003
parent6f65e7fa18a406c5b233d7d692186b302d594971 (diff)
Compare large and small images
Diffstat (limited to 'examples/003')
-rw-r--r--examples/003/Dockerfile5
-rw-r--r--examples/003/run.sh8
2 files changed, 7 insertions, 6 deletions
diff --git a/examples/003/Dockerfile b/examples/003/Dockerfile
index 35b83ea..a722743 100644
--- a/examples/003/Dockerfile
+++ b/examples/003/Dockerfile
@@ -1,8 +1,9 @@
FROM debian:stable-slim
ENV PACKAGES git ruby zstd
-RUN apt-get update -y --no-install-recommends $PACKAGES \
+RUN apt-get update -y \
+ && apt-get install -y --no-install-recommends $PACKAGES \
&& git clone https://github.com/spandx/cache.git /opt/db \
&& tar --use-compress-program zstd -cf /opt/db.tar.zst /opt/db \
&& rm -fr /opt/db
COPY run.sh /run.sh
-CMD ['/run.sh']
+ENTRYPOINT ["/run.sh"]
diff --git a/examples/003/run.sh b/examples/003/run.sh
index db1f294..bf50deb 100644
--- a/examples/003/run.sh
+++ b/examples/003/run.sh
@@ -1,8 +1,8 @@
#!/bin/sh
-set -ex
+set -e
+echo "[$(date +s)] Inflating /opt/db.tar.zst"
tar -xf /opt/db.tar.zst
-
-cd /opt/db/.index
-sh
+echo sh "$@"
+sh "$@"