diff --git a/packaging/docker/Dockerfile.app-raspbian b/packaging/docker/Dockerfile.app-raspbian index 5778a4061..fa2b8642d 100644 --- a/packaging/docker/Dockerfile.app-raspbian +++ b/packaging/docker/Dockerfile.app-raspbian @@ -1,9 +1,5 @@ # Dockerfile # -# This image can be used for running VILLASnode -# by running: -# make docker -# # @author Steffen Vogel # @copyright 2014-2019, Institute for Automation of Complex Power Systems, EONERC # @license GNU General Public License (version 3) @@ -31,14 +27,14 @@ ARG GIT_BRANCH=unknown ARG VERSION=unknown ARG VARIANT=unknown -# This image is built by villas-node-git/packaging/docker/Dockerfile.dev +# This image is built by villas-node-git/packaging/docker/Dockerfile.dev-raspbian FROM $BUILDER_IMAGE COPY . /villas/ RUN rm -rf /villas/build && mkdir /villas/build WORKDIR /villas/build -RUN cmake -DCPACK_GENERATOR=RPM .. +RUN cmake .. RUN make -j$(nproc) install # For WebSocket / API access diff --git a/packaging/docker/Dockerfile.dev-raspbian b/packaging/docker/Dockerfile.dev-raspbian index 98a815eef..28fda7df6 100644 --- a/packaging/docker/Dockerfile.dev-raspbian +++ b/packaging/docker/Dockerfile.dev-raspbian @@ -1,12 +1,4 @@ -# Dockerfile for VILLASnode development. -# -# This Dockerfile builds an image which contains all library dependencies -# and tools to build VILLASnode. -# However, VILLASnode itself it not part of the image. -# -# This image can be used for developing VILLASnode -# by running: -# make docker +# Dockerfile for cross-compilation in Docker targeting the Raspberyy Pi. # # @author Steffen Vogel # @copyright 2014-2019, Institute for Automation of Complex Power Systems, EONERC @@ -35,24 +27,18 @@ ARG GIT_BRANCH=unknown ARG VERSION=unknown ARG VARIANT=unknown +RUN echo 'APT::Default-Release "stable";' > /etc/apt/apt.conf.d/99defaultrelease +RUN echo 'deb http://archive.raspbian.org/raspbian buster main contrib non-free rpi firmware' >> /etc/apt/sources.list.d/buster.list + # Toolchain RUN apt-get update && apt-get install -y \ - gcc g++ \ autoconf automake libtool \ - pkg-config cmake make ninja-build \ - texinfo git curl tar \ + pkg-config cmake make \ + git curl tar bzip2 \ protobuf-compiler protobuf-c-compiler -# Several tools only needed for developement and testing -RUN apt-get install -y \ - doxygen dia graphviz \ - openssh-client \ - jq netcat \ - iproute2 \ - python-pip \ - valgrind gdb gdbserver \ - xmlto asciidoctor \ - rabbitmq-server mosquitto +RUN apt-get install -y -t buster \ + gcc-8 g++-8 # Dependencies RUN apt-get install -y \ @@ -74,6 +60,9 @@ RUN apt-get install -y \ libre-dev \ libusb-1.0-0-dev +ENV CC=gcc-8 +ENV CXX=gcc-8 + # Build & Install libwebsockets RUN cd /tmp && \ git clone -b v3.1-stable https://github.com/warmcat/libwebsockets && \ @@ -91,17 +80,15 @@ RUN cd /tmp && \ RUN cd /tmp && \ git clone -b rpm https://github.com/stv0g/uldaq && \ cd uldaq && \ - autoreconf -i && ./configure && make -j$(nproc) install && \ + autoreconf -i && ./configure --enable-examples=no && \ + make -j$(nproc) install && \ rm -rf /tmp/* # Expose ports for HTTP and WebSocket frontend EXPOSE 80 EXPOSE 443 -ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64 - -# Workaround for libnl3's search path for netem distributions -RUN ln -s /usr/lib64/tc /usr/lib/tc +ENV LD_LIBRARY_PATH /usr/local/lib WORKDIR /villas ENTRYPOINT bash @@ -120,4 +107,4 @@ LABEL \ org.label-schema.description="A image containing all build-time dependencies for VILLASnode based on Ubuntu" \ org.label-schema.url="http://fein-aachen.org/projects/villas-framework/" \ org.label-schema.vcs-url="https://git.rwth-aachen.de/VILLASframework/VILLASnode" \ - org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker" + org.label-schema.usage="https://villas.fein-aachen.org/doc/node-installation.html#node-installation-docker" \ No newline at end of file