From 432ed7f688f47c80469823674b59c0cf9724c710 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Tue, 17 May 2022 23:32:59 +0000 Subject: [PATCH] Add package stage --- Dockerfile | 13 ++++++++++--- Mayhemfile | 5 ++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53abbf4f3025..7d1b78f38dd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ -# Build Stage FROM --platform=linux/amd64 ubuntu:20.04 as builder -## Install build dependencies. RUN apt-get update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim less man wget tar git gzip unzip make cmake software-properties-common curl +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make gcc ADD . /repo WORKDIR /repo/unix @@ -11,3 +9,12 @@ ENV LD_LIBRARY_PATH=/repo/unix RUN ldconfig RUN ./configure RUN make -j8 + +RUN mkdir -p /deps +RUN ldd /repo/unix/tclsh | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'cp % /deps;' + +FROM ubuntu:20.04 as package + +COPY --from=builder /deps /deps +COPY --from=builder /repo/unix/tclsh /repo/unix/tclsh +ENV LD_LIBRARY_PATH=/deps diff --git a/Mayhemfile b/Mayhemfile index d1761029add4..e456c167a19b 100644 --- a/Mayhemfile +++ b/Mayhemfile @@ -1,7 +1,6 @@ -project: rnshah9/mayhem-tcl +project: tcl target: tclsh -tests: null cmds: - - cmd: /repo/unix/tclsh @@ + - cmd: /repo/unix/tclsh /test.tcl filepath: /test.tcl