forked from afdaniele/dt-apriltags
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
38 lines (30 loc) · 1.09 KB
/
Dockerfile
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
# syntax=docker/dockerfile:1
# get OSX SDK
ARG OSXCROSS_VERSION=13.1-r0
FROM crazymax/osxcross:${OSXCROSS_VERSION}-ubuntu AS osxcross
FROM ubuntu:20.04
ENV PATH="/osxcross/bin:$PATH"
ENV LD_LIBRARY_PATH="/osxcross/lib"
COPY --from=osxcross /osxcross /osxcross
ARG DEBIAN_FRONTEND=noninteractive
# install most the compilers needed for all targets
RUN apt-get update && apt-get install -y clang lld libc6-dev \
cmake make libtool gcc g++ \
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 \
gcc-mingw-w64-i686 g++-mingw-w64-i686 \
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
python3-pip
# install the remaining compiler dependent on the container architecture
RUN if [ "$(uname -m)" = "x86_64" ]; then \
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu; \
else \
apt-get install -y gcc-x86-64-linux-gnu g++-x86-64-linux-gnu; \
fi
# install python libraries
RUN pip install numpy
# support from win7 in mingw
ENV CXXFLAGS="-DWINVER=0x0600 -D_WIN32_WINNT=0x0600"
# install building script
COPY ./assets/build.sh /build.sh
# define command
CMD /build.sh