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 Sep 4, 2022
1 parent 3568dd5 commit 8625bcf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Build Stage
FROM --platform=linux/amd64 ubuntu:20.04 as builder

## Install build dependencies.
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim less man wget tar git gzip unzip make cmake software-properties-common curl
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make gcc

ADD . /repo
WORKDIR /repo/unix
ENV LD_LIBRARY_PATH=/repo/unix
RUN ldconfig
RUN ./configure
RUN make -j8

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

cmds:
- cmd: /repo/unix/tclsh @@
- cmd: /repo/unix/tclsh /test.tcl
filepath: /test.tcl

0 comments on commit 8625bcf

Please sign in to comment.