forked from openthread/ot-efr32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (30 loc) · 982 Bytes
/
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
FROM ubuntu:22.04
ENV TZ="America/New_York"
ENV repo_dir="/ot-efr32"
WORKDIR ${repo_dir}
# Install packages
RUN apt-get update && \
apt-get -y install --no-install-recommends \
sudo \
tzdata \
&& rm -rf /var/lib/apt/lists/*
# Copy scripts
COPY ./openthread/script ./openthread/script
COPY ./script/bootstrap \
./script/bootstrap_silabs \
./script/
COPY ./requirements.txt .
# Bootstrap
RUN ./script/bootstrap packages && rm -rf /var/lib/apt/lists/*
RUN ./script/bootstrap openthread && rm -rf /var/lib/apt/lists/*
# Label the build date before downloading slc to force slc to always be download during a docker build
ARG BUILD_DATE
LABEL build_date=${BUILD_DATE}
ENV SLC_INSTALL_DIR=/opt/slc_cli
RUN mkdir ${SLC_INSTALL_DIR} && \
./script/bootstrap silabs
# Clone repo for convenience
ARG REPO_URL="https://github.com/openthread/ot-efr32"
WORKDIR /
RUN rm -rf ${repo_dir} && git clone ${REPO_URL} ${repo_dir}
WORKDIR ${repo_dir}