From 813c23b712a883e1ffe6f2c600a06fbab27369de Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Wed, 15 Jun 2022 06:28:03 +0000 Subject: [PATCH] Add package stage --- Dockerfile.mayhem | 11 ++++++++++- Mayhemfile | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile.mayhem b/Dockerfile.mayhem index 804dc330..8f43b0e6 100644 --- a/Dockerfile.mayhem +++ b/Dockerfile.mayhem @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:20.04 as builder RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential automake libtool pkg-config bison flex @@ -9,3 +9,12 @@ RUN libtoolize -qi RUN autoreconf RUN ./configure RUN make + +RUN mkdir -p /deps +RUN ldd /repo/es | 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/es /repo/es +ENV LD_LIBRARY_PATH=/deps diff --git a/Mayhemfile b/Mayhemfile index 006b370f..7d45ca0e 100644 --- a/Mayhemfile +++ b/Mayhemfile @@ -1,4 +1,4 @@ -project: rnshah9/es-shell +project: es-shell target: es cmds: