-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.cache | ||
.vscode | ||
build/ | ||
** | ||
|
||
!cmake/ | ||
!src/ | ||
!CMakeLists.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
FROM alpine:latest as build | ||
|
||
RUN apk add --no-cache --virtual .build-deps-base \ | ||
RUN apk add --no-cache \ | ||
clang \ | ||
cmake \ | ||
cppzmq \ | ||
git \ | ||
make \ | ||
pkgconf | ||
|
||
ENV CC=clang | ||
ENV CXX=clang++ | ||
ENV CC="clang" | ||
ENV CXX="clang++" | ||
ENV CFLAGS="-O3" | ||
ENV CXXFLAGS="-O3" | ||
ENV MAKEFLAGS="-j$(nproc)" | ||
|
||
RUN mkdir -p /build | ||
WORKDIR /build | ||
RUN mkdir -p /opt/lmz | ||
WORKDIR /opt/lmz | ||
|
||
RUN git clone --depth 1 https://github.com/Knifa/rpi-rgb-led-matrix.git | ||
WORKDIR /build/rpi-rgb-led-matrix | ||
RUN cd lib \ | ||
RUN git clone --depth 1 https://github.com/knifa/rpi-rgb-led-matrix.git \ | ||
&& cd rpi-rgb-led-matrix/lib \ | ||
&& make | ||
|
||
RUN mkdir -p /build/led-matrix-zmq-server | ||
WORKDIR /build/led-matrix-zmq-server | ||
ADD . . | ||
RUN mkdir -p /opt/lmz/led-matrix-zmq-server | ||
WORKDIR /opt/lmz/led-matrix-zmq-server | ||
COPY . . | ||
RUN mkdir -p build \ | ||
&& cd build \ | ||
&& cmake -DRPI_RGB_LED_MATRIX_DIR=/build/rpi-rgb-led-matrix .. \ | ||
&& cmake -DRPI_RGB_LED_MATRIX_DIR=/opt/lmz/rpi-rgb-led-matrix .. \ | ||
&& make | ||
|
||
|
||
FROM alpine:latest as run | ||
|
||
RUN apk add --no-cache \ | ||
libc++ \ | ||
libzmq | ||
|
||
RUN mkdir -p /opt/led-matrix-zmq-server | ||
WORKDIR /opt/led-matrix-zmq-server | ||
RUN mkdir -p /opt/lmz | ||
WORKDIR /opt/lmz/ | ||
|
||
COPY --from=build \ | ||
/build/led-matrix-zmq-server/build/led-matrix-zmq-* \ | ||
/opt/lmz/led-matrix-zmq-server/build/led-matrix-zmq-* \ | ||
./ | ||
|
||
ENV PATH="/opt/led-matrix-zmq-server:$PATH" | ||
ENV PATH="/opt/lmz:$PATH" | ||
CMD ["echo", "Please run a specific led-matrix-zmq binary!"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters