-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile.pibuilder
48 lines (39 loc) · 1.46 KB
/
Dockerfile.pibuilder
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
# 2024-01-29 16:16
ARG BASE=multiarch/debian-debootstrap:arm64-bullseye-slim
FROM $BASE
# Replace shell with bash so we can source files
SHELL ["/bin/bash", "--login", "-ce"]
ARG GOVERSION=1.23.4
RUN apt-get update --allow-unauthenticated --allow-insecure-repositories && \
apt-get install --allow-unauthenticated -y debian-archive-keyring && \
apt-get clean
RUN apt-get update && \
apt-get install -y \
automake \
build-essential \
ca-certificates \
curl \
gcc \
git \
g++ \
python3 \
rsync
RUN update-ca-certificates -f
ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
RUN GOIMG= && a="$(dpkg --print-architecture)" && \
case "${a##*-}" in \
arm64|aarch64) GOIMG="go${GOVERSION}.linux-arm64.tar.gz";; \
amd64) GOIMG="go${GOVERSION}.linux-amd64.tar.gz";; \
armv7l|armv6l|armhf) GOIMG="go${GOVERSION}.linux-armv6l.tar.gz";; \
*) echo "unsupported arch ${a}"; exit 1 ;;\
esac && \
curl -k -L https://go.dev/dl/${GOIMG} -o /tmp/${GOIMG} && \
tar -C /usr/local -xzf /tmp/${GOIMG} && \
/usr/local/go/bin/go version
ENV PATH="/usr/local/go/bin:${PATH}"
COPY .nvmrc /root/.nvmrc
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
RUN cd /root && nvm install && nvm install 18.16.0 && nvm install 20.11.0
COPY ./internal/rgbmatrix-rpi/lib/rpi-rgb-led-matrix.BASE /sportsmatrix_lib/rpi-rgb-led-matrix
RUN cd /sportsmatrix_lib/rpi-rgb-led-matrix && \
make