-
Notifications
You must be signed in to change notification settings - Fork 63
/
Dockerfile
47 lines (35 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG IMAGE=ruby:3.3
FROM $IMAGE
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q build-essential autoconf libtool clang lcov clang-tidy libclang-dev lldb gdb python3 python3-pip ccache
# PIP externally-managed-environment now forces you
# to be explicit when installing system-wide package
# https://veronneau.org/python-311-pip-and-breaking-system-packages.html
RUN pip3 install compiledb || pip3 install compiledb --break-system-packages
RUN gem install bundler --no-doc
ENV LC_ALL=C.UTF-8
ENV LLVM_CONFIG=/usr/lib/llvm-14/bin/llvm-config
WORKDIR natalie
COPY .git/ .git/
COPY .gitmodules .gitmodules
COPY .clang-tidy .clang-tidy
RUN git submodule update --init --recursive
COPY Gemfile Gemfile.lock /natalie/
RUN bundle install
ARG CC=gcc
ENV CC=$CC
ARG CXX=g++
ENV CXX=$CXX
ARG NAT_CXX_FLAGS
ENV NAT_CXX_FLAGS=$NAT_CXX_FLAGS
ENV USER=root
COPY ext ext
COPY Rakefile Rakefile
COPY bin bin
COPY examples examples
COPY lib lib
COPY src src
COPY include include
RUN rake build
COPY spec spec
COPY test test
ENTRYPOINT ["/natalie/bin/natalie"]