2022-05-20 08:52:19 +02:00
|
|
|
FROM alpine:latest AS builder
|
|
|
|
|
|
|
|
RUN apk update && apk add gcc g++ cmake automake autoconf libtool make linux-headers git
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
RUN git clone --depth=1 https://github.com/fumiama/simple-protobuf.git \
|
|
|
|
&& cd simple-protobuf \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make install
|
|
|
|
|
|
|
|
RUN rm -rf *
|
|
|
|
|
|
|
|
RUN git clone --depth=1 https://github.com/fumiama/simple-http-server.git \
|
|
|
|
&& cd simple-http-server \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make install
|
|
|
|
|
|
|
|
RUN rm -rf *
|
|
|
|
|
2022-11-23 07:39:37 +01:00
|
|
|
RUN git clone --depth=1 https://github.com/fumiama/C302.git \
|
|
|
|
&& cd C302 \
|
|
|
|
&& mkdir build \
|
|
|
|
&& cd build \
|
|
|
|
&& cmake .. \
|
|
|
|
&& make install
|
|
|
|
|
|
|
|
RUN rm -rf *
|
|
|
|
|
2022-05-20 08:52:19 +02:00
|
|
|
COPY ./*.c .
|
|
|
|
COPY ./*.h .
|
|
|
|
COPY ./CMakeLists.txt .
|
|
|
|
|
|
|
|
RUN mkdir build \
|
|
|
|
&& cd build \
|
2024-04-12 15:55:42 +02:00
|
|
|
&& cmake -DBUILD=docker .. \
|
2022-05-20 08:52:19 +02:00
|
|
|
&& make install
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
COPY --from=builder /usr/local/bin/simple-http-server /usr/bin/simple-http-server
|
|
|
|
COPY --from=builder /usr/local/bin/cmoe /data/cmoe
|
2022-11-23 07:39:37 +01:00
|
|
|
COPY --from=builder /usr/local/bin/c302 /data/c302
|
2022-05-20 08:52:19 +02:00
|
|
|
COPY --from=builder /usr/local/lib/libspb.so /usr/local/lib/libspb.so
|
|
|
|
RUN chmod +x /usr/bin/simple-http-server
|
|
|
|
RUN chmod +x /data/cmoe
|
2022-11-23 07:39:37 +01:00
|
|
|
RUN chmod +x /data/c302
|
2022-05-20 08:52:19 +02:00
|
|
|
|
|
|
|
WORKDIR /data
|
|
|
|
COPY ./assets/favicon.ico .
|
|
|
|
COPY ./assets/index.html .
|
|
|
|
COPY ./assets/style.css .
|
|
|
|
|
2022-11-23 07:39:37 +01:00
|
|
|
ENTRYPOINT [ "/usr/bin/simple-http-server" ]
|