Skip to content

Commit

Permalink
Remove ldd
Browse files Browse the repository at this point in the history
  • Loading branch information
rnshah9 authored and ForAllSecure Mayhem Bot committed Sep 15, 2024
1 parent 9587186 commit 14a2001
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions Dockerfile.mayhem
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ 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

ADD . /repo
COPY . /repo
WORKDIR /repo
RUN libtoolize -qi
RUN autoreconf
RUN ./configure
RUN ./configure --prefix=/install
RUN make

RUN mkdir -p /deps
RUN ldd /repo/es | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'cp % /deps;'
RUN make install

FROM ubuntu:20.04 as package

COPY --from=builder /deps /deps
COPY --from=builder /repo/es /repo/es
ENV LD_LIBRARY_PATH=/deps
COPY --from=builder /install /install
2 changes: 1 addition & 1 deletion Mayhemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ project: es-shell
target: es

cmds:
- cmd: /repo/es @@
- cmd: /install/bin/es @@

0 comments on commit 14a2001

Please sign in to comment.