Skip to content

Commit

Permalink
Add package stage
Browse files Browse the repository at this point in the history
  • Loading branch information
rnshah9 authored and ForAllSecure Mayhem Bot committed Apr 14, 2024
1 parent c57cb04 commit d0ef87d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 10 additions & 1 deletion Dockerfile.mayhem
Original file line number Diff line number Diff line change
@@ -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 qtcreator qt5-default build-essential
Expand All @@ -7,3 +7,12 @@ COPY . /repo
WORKDIR /repo
RUN qmake
RUN make -j8

RUN mkdir -p /deps
RUN ldd /repo/cpi | 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/cpi /repo/cpi
ENV LD_LIBRARY_PATH=/deps
3 changes: 1 addition & 2 deletions Mayhemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
project: rnshah9/cpi
project: cpi
target: cpi
tests: null

cmds:
- cmd: /repo/cpi @@

0 comments on commit d0ef87d

Please sign in to comment.