-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
58 lines (49 loc) · 1.41 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
FROM ubuntu:20.04
# Scripts and configuration
COPY files/root/* /root/
COPY files/bin/* /bin/
# tzdata will stall autobuild of docker image
# this fixes that
ENV TZ=US/Pacific
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Make sure line endings are Unix
# This changes nothing if core.autocrlf is set to input
RUN sed -i 's/\r$//' /root/.bashrc
RUN apt-get update && apt-get install -y \
clang \
clang-tidy \
clang-format \
g++ \
make \
valgrind \
gdb \
llvm \
libgtest-dev \
software-properties-common \
cmake \
curl \
default-jre \
pkg-config \
wget
# GTEST installation for labs
WORKDIR /usr/src/gtest
RUN cmake CMakeLists.txt \
&& make \
&& cp ./lib/libgtest*.a /usr/lib \
&& mkdir -p /usr/local/lib/gtest/ \
&& ln -s /usr/lib/libgtest.a /usr/local/lib/gtest/libgtest.a \
&& ln -s /usr/lib/libgtest_main.a /usr/local/lib/gtest/libgtest_main.a
# Grading, curricula requires python3.9
RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt-get install -y \
git \
acl \
python3.9 \
python3.9-dev \
python3-pip
# Removed while we're doing CMake grading
# && python3.9 -m pip install curricula curricula-grade curricula-grade-cpp curricula-compile curricula-format watchdog
# Install xmltodict for CMake tests
RUN python3 -m pip install xmltodict
VOLUME ["/work"]
WORKDIR /work