Skip to content

Commit

Permalink
Remove ldd
Browse files Browse the repository at this point in the history
  • Loading branch information
rnshah9 authored and mayhem-bot committed Apr 28, 2023
1 parent 5078292 commit e499ea0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/mayhem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: recursive

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand All @@ -43,6 +43,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
file: ./Dockerfile.mayhem
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
10 changes: 2 additions & 8 deletions Dockerfile.mayhem
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@ FROM --platform=linux/amd64 ubuntu:20.04 as builder
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential

ADD . /repo
COPY . /repo
WORKDIR /repo/compiler
RUN ./build-amd64.sh
RUN ./compile-run-amd64.sh test/amd64/arith.c

RUN mkdir -p /deps
RUN ldd /repo/compiler/a.out | 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/compiler/a.out /repo/compiler/a.out
ENV LD_LIBRARY_PATH=/deps
COPY --from=builder /repo/compiler/a.out /
2 changes: 1 addition & 1 deletion Mayhemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ project: new-bpf-tools
target: a-out

cmds:
- cmd: /repo/compiler/a.out
- cmd: /a.out

0 comments on commit e499ea0

Please sign in to comment.