-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
70 lines (54 loc) · 1.77 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
66
67
68
69
70
FROM ubuntu:20.04
LABEL org.opencontainers.image.description="A PROS Build Container"
LABEL org.opencontainers.image.source=https://github.com/lemlib/pros-build
LABEL org.opencontainers.image.licenses=MIT
# ------------
# Install Required Packages
# ------------
COPY packagelist /packagelist
RUN apt-get update && apt-get install -y $(cat /packagelist) && apt-get clean
RUN rm /packagelist # Cleanup Image
# ------------
# Set Timezone and set frontend to noninteractive
# ------------
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "tzdata tzdata/Areas select America" | debconf-set-selections \
&& echo "tzdata tzdata/Zones/America select Los_Angeles" | debconf-set-selections
# ------------
# Install ARM Toolchain
# ------------
RUN wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" -O gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
RUN tar -xjvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
RUN rm gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 # Cleanup Image
ENV PATH="/gcc-arm-none-eabi-10.3-2021.10/bin:${PATH}"
# ------------
# Install PROS CLI
# ------------
RUN python3 -m pip install pros-cli
# ------------
# Cleanup
# ------------
# Cleanup APT
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# ------------
# Verify Installation
# ------------
RUN python3 --version
RUN pros --version
RUN arm-none-eabi-g++ --version
RUN arm-none-eabi-gcc --version
RUN git --version
RUN make --version
RUN unzip
RUN awk --version
# ------------
# SETUP BUILD
# ------------
ENV PROS_PROJECT ${PROS_PROJECT}
ENV REPOSITORY ${REPOSITORY}
ENV LIBRARY_PATH ${LIBRARY_PATH}
RUN env
COPY build-tools/build.sh .
RUN chmod +x ./build.sh
COPY LICENSE .
ENTRYPOINT ["/build.sh"]