Skip to content

Commit

Permalink
Add package stage
Browse files Browse the repository at this point in the history
  • Loading branch information
rnshah9 committed Jun 14, 2022
1 parent 4b01421 commit 1aad02e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Dockerfile.mayhem
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
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 libyaml-dev

ADD . /repo
WORKDIR /repo
RUN make -j8

RUN mkdir -p /deps
RUN ldd /repo/build/debug/planner | 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/build/debug/planner /repo/build/debug/planner
ENV LD_LIBRARY_PATH=/deps
2 changes: 1 addition & 1 deletion Mayhemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project: rnshah9/libcyaml
project: libcyaml
target: planner

cmds:
Expand Down

0 comments on commit 1aad02e

Please sign in to comment.