Skip to content

Instantly share code, notes, and snippets.

@juzam
Last active August 31, 2017 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juzam/a2f2a9abcf41d78a3456a2e4c851283b to your computer and use it in GitHub Desktop.
Save juzam/a2f2a9abcf41d78a3456a2e4c851283b to your computer and use it in GitHub Desktop.
ot-recorder .deb build Dockerfiles/scripts

on a Raspberry pi (2,3) or similiar arm32v7 arch machine with docker:

  • remove previous image if present:

docker rmi recorder-build:arm32v7

  • build the image:

docker build -t recorder-build:arm32v7 -f Dockerfile.arm32v7 --no-cache .

  • copy the .deb package to current dir:

docker run --rm -v $(pwd):/tmp -it recorder-build:arm32v7 /bin/bash -c 'cp *.deb /tmp'

FROM debian:stretch
RUN apt-get update && apt-get install -y build-essential libcurl4-openssl-dev libmosquitto-dev liblua5.2-dev libsodium-dev libconfig-dev
# fpm
RUN apt-get install -y ruby ruby-dev rubygems gcc make
RUN gem install --no-ri --no-rdoc fpm
RUN apt-get install -y vim git && git clone https://github.com/owntracks/recorder.git
WORKDIR recorder
RUN cp config.mk.in config.mk && sed -i 's/lua`/lua5.2`/g' config.mk && sed -i 's@INSTALLDIR = /usr/local@INSTALLDIR = /usr@' config.mk
# temporary stretch patch
RUN sed -i 's/9.0/9.\*/' etc/debian/fpm-make.sh
RUN make mdb/liblmdb.a
RUN etc/debian/fpm-make.sh
FROM arm32v7/debian:stretch
RUN apt-get update && apt-get install -y build-essential libcurl4-openssl-dev libmosquitto-dev liblua5.2-dev libsodium-dev libconfig-dev
# fpm
RUN apt-get install -y ruby ruby-dev rubygems gcc make
RUN gem install --no-ri --no-rdoc fpm
RUN apt-get install -y vim git && git clone https://github.com/owntracks/recorder.git
WORKDIR recorder
RUN cp config.mk.in config.mk && sed -i 's/lua`/lua5.2`/g' config.mk && sed -i 's@INSTALLDIR = /usr/local@INSTALLDIR = /usr@' config.mk
# temporary stretch patch
RUN sed -i 's/9.0/9.\*/' etc/debian/fpm-make.sh
RUN make mdb/liblmdb.a
RUN etc/debian/fpm-make.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment