-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (47 loc) · 1.74 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
FROM ubuntu:focal AS builder
MAINTAINER Ingo Müller <[email protected]>
# Basics
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
git \
libcurl4-openssl-dev \
libpulse-dev \
libssl-dev \
uuid-dev \
wget \
xz-utils \
zlib1g-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Clang+LLVM
RUN mkdir /opt/clang+llvm-11.1.0/ && \
cd /opt/clang+llvm-11.1.0/ && \
wget --progress=dot:giga https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz -O - \
| tar -x -I xz --strip-components=1 && \
for file in bin/*; \
do \
ln -s $PWD/$file /usr/bin/$(basename $file)-11.1; \
done && \
ln -s libomp.so /opt/clang+llvm-11.1.0/lib/libomp.so.5 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11.1 100 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11.1 100
# Build the SDK
RUN git clone --depth 1 --shallow-submodules --recurse-submodules --branch 1.9.94 \
https://github.com/aws/aws-sdk-cpp.git /tmp/aws-sdk-cpp/ && \
mkdir -p /tmp/aws-sdk-cpp/build && \
cd /tmp/aws-sdk-cpp/build && \
CXX=clang++ CC=clang \
cmake \
-DBUILD_ONLY="dynamodb;lambda;s3;sqs" \
-DCMAKE_BUILD_TYPE=Debug \
-DCPP_STANDARD=17 \
-DENABLE_TESTING=OFF \
-DCUSTOM_MEMORY_MANAGEMENT=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/aws-sdk-cpp-1.9/ \
.. && \
make install && \
rm -rf /tmp/aws-sdk-cpp
# Main image
FROM ubuntu:focal
COPY --from=builder /opt/aws-sdk-cpp-1.9 /opt/aws-sdk-cpp-1.9