-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.7 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.7 KB
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
ARG version=latest
FROM lavasoftware/lava-dispatcher:${version}
WORKDIR /opt/
RUN apt -q update || apt -q update
RUN DEBIAN_FRONTEND=noninteractive apt-get -q -y install build-essential git pkg-config cmake libusb-dev libftdi-dev
RUN git clone https://github.com/96boards/96boards-uart.git
# Avoid using new libusb because of build-error
RUN cd 96boards-uart && git checkout 1d2bc993083d97b54d21ecdf72556066efce11f7
RUN cd 96boards-uart/96boardsctl/ && cmake . && make
FROM lavasoftware/lava-dispatcher:${version}
ARG extra_packages=""
RUN apt -q update || apt -q update
RUN DEBIAN_FRONTEND=noninteractive apt-get -q -y install software-properties-common libftdi1
RUN apt-add-repository non-free
RUN apt -q update || apt -q update
RUN DEBIAN_FRONTEND=noninteractive apt-get -q -y install ${extra_packages} net-tools snmp snmp-mibs-downloader
RUN download-mibs
# Add MIBs
RUN mkdir -p /usr/share/snmp/mibs/
ADD powernet428.mib /usr/share/snmp/mibs/
# Add lab scripts
RUN mkdir -p /usr/local/lab-scripts/
ADD https://git.linaro.org/lava/lava-lab.git/plain/shared/lab-scripts/snmp_pdu_control /usr/local/lab-scripts/
RUN chmod a+x /usr/local/lab-scripts/snmp_pdu_control
ADD https://git.linaro.org/lava/lava-lab.git/plain/shared/lab-scripts/eth008_control /usr/local/lab-scripts/
RUN chmod a+x /usr/local/lab-scripts/eth008_control
# Add 96boardsctl
COPY --from=0 /opt/96boards-uart/96boardsctl/96boardsctl /usr/bin/
ARG server=lava-server
# Old config file ( < 2021)
RUN echo "MASTER_URL=\"tcp://${server}:5556\"" >> /etc/lava-dispatcher/lava-slave
RUN echo "LOGGER_URL=\"tcp://${server}:5555\"" >> /etc/lava-dispatcher/lava-slave
RUN echo "URL=\"http://${server}/\"" > /etc/lava-dispatcher/lava-worker
ENTRYPOINT ["/root/entrypoint.sh"]