-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
65 lines (44 loc) · 2.11 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM --platform=linux/x86_64 ubuntu:latest
RUN apt-get -y update && apt-get install -y
RUN apt-get -y install curl gnupg2 software-properties-common ninja-build apt-utils make
RUN apt-get -y install wget
RUN apt-get -y install git
# Are the build-essential packages needed? This elminates a CMake error
# about /usr/bin/c++ not being found but seems like overkill.
RUN apt-get -y install build-essential
# Install llvm/clang
# This is nesessary because of an issue with the hyde resource-dir. The
# version of clang installed must exactly match the version of clang used
# to build hyde. This is a temporary fix until hyde installs the necessary
# resource directory and encodes the path in the binary.
# If you get an error message about stddef.h or size_t not being found,
# the issue is here. Check where hyde is looking for it's resoruce
# directory with
# `hyde ./test.hpp -- -x c++ -print-resource-dir`
# FROM base AS full
ENV LLVM_VERSION=15
RUN apt-get -y install clang-${LLVM_VERSION}
RUN apt-get -y install libc++-${LLVM_VERSION}-dev
# set clang ${LLVM_VERSION} to be the version of clang we use when clang/clang++ is invoked
RUN update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} 100
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 100
ADD https://cmake.org/files/v3.24/cmake-3.24.0-linux-x86_64.sh /cmake-3.24.0-linux-x86_64.sh
RUN mkdir /opt/cmake
RUN sh /cmake-3.24.0-linux-x86_64.sh --prefix=/opt/cmake --skip-license
RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
#install hyde dependencies
RUN apt-get -y install libyaml-cpp-dev libboost-system-dev libboost-filesystem-dev
COPY . /usr/src/hyde
# build hyde and run the generate_test_files
WORKDIR /usr/src/hyde
RUN mkdir -p build \
&& cd build \
&& rm -rf * \
&& cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release \
&& ninja
# install hyde
RUN cp ./build/hyde /usr/bin
# RUN apt-get -y install clang-15
CMD ["./generate_test_files.sh"]
# Experimenting with publishing the container and linking it to the hyde repo:
LABEL org.opencontainers.image.source=https://github.com/adobe/hyde