-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.amd64
27 lines (26 loc) · 904 Bytes
/
Dockerfile.amd64
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
FROM alpine:edge as builder
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN echo "@community http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk update && \
apk --no-cache add \
ca-certificates \
cmake \
g++ \
make \
eigen@community
RUN apk add libcluon --no-cache --repository https://chrberger.github.io/libcluon/alpine/v3.7 --allow-untrusted
COPY CMakeLists.txt *.cmake /opt/sources/
COPY src/ /opt/sources/src/
COPY thirdparty/ /opt/sources/thirdparty/
WORKDIR /opt/sources
RUN mkdir /tmp/build && \
cd /tmp/build && \
cmake -D CMAKE_BUILD_TYPE=Release /opt/sources && \
make -j && cp autonomous-robot /tmp
# Deploy.
FROM alpine:edge
RUN mkdir /opt
WORKDIR /opt
COPY --from=builder /tmp/autonomous-robot ./
COPY *.conf *.txt ./
ENTRYPOINT ["/opt/autonomous-robot"]