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 mayhem-bot committed Oct 2, 2022
1 parent ddf868d commit 86f6a04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y gcc
ADD . /wax
WORKDIR /wax
RUN gcc ./src/waxc.c -o waxc

RUN mkdir -p /deps
RUN ldd /wax/waxc | 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 /wax/waxc /wax/waxc
ENV LD_LIBRARY_PATH=/deps
4 changes: 2 additions & 2 deletions Mayhemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project: rnshah9/mayhem-wax
project: wax
target: waxc

cmds:
- cmd: /wax/waxc @@ --c test.c
- cmd: /wax/waxc /test.wax --c test.c
filepath: /test.wax

0 comments on commit 86f6a04

Please sign in to comment.