-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.arm64
More file actions
29 lines (23 loc) · 740 Bytes
/
Copy pathDockerfile.arm64
File metadata and controls
29 lines (23 loc) · 740 Bytes
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
FROM golang:1.19-bullseye
RUN apt-get update && apt-get install -y \
cmake \
git \
gcc-aarch64-linux-gnu \
g++-aarch64-linux-gnu
WORKDIR /dashd/lib
RUN git clone https://github.com/jgarff/rpi_ws281x.git
WORKDIR /dashd/lib/rpi_ws281x/build/
RUN cmake \
-D BUILD_SHARED=OFF \
-D BUILD_TEST=OFF \
-D CMAKE_C_COMPILER:STRING="aarch64-linux-gnu-gcc" \
-D CMAKE_CXX_COMPILER:STRING="aarch64-linux-gnu-g++" \
..
RUN cmake --build .
RUN make install
ENV GOOS=linux GOARCH=arm64
ENV CGO_ENABLED=1 PKG_CONFIG_PATH="/usr/lib/aarch64-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}"
ENV CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
VOLUME /dashd/app
WORKDIR /dashd/app
ENTRYPOINT go build -o=build/DashD.arm64 ./