Skip to content

Instantly share code, notes, and snippets.

@kojix2
Created May 22, 2022 14:53
Show Gist options
  • Save kojix2/151060ad94e9cdc1119d82a07cbae737 to your computer and use it in GitHub Desktop.
Save kojix2/151060ad94e9cdc1119d82a07cbae737 to your computer and use it in GitHub Desktop.
c2ffi Dockerfile
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y llvm-11 clang-11 libclang-11-dev libclang-cpp11-dev python3-pip
# Easiest way to get sufficiently new cmake appears to be using pip - Ubuntu 20.10 version is too old
RUN pip3 install --upgrade cmake
# Copy the source into the Docker container
RUN mkdir -p /c2ffi
COPY / /c2ffi
WORKDIR /c2ffi
# Build c2ffi
RUN cd /c2ffi && \
rm -rf build && mkdir -p build && cd build && \
cmake -DBUILD_CONFIG=Release .. && make
# export PATH="$PATH:/c2ffi/build/bin"
RUN mkdir -p /data
WORKDIR /data
ENTRYPOINT ["/c2ffi/build/bin/c2ffi"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment