Skip to content

Commit

Permalink
Create Dockerfile-QEMU-ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatoledo authored Jan 2, 2023
1 parent 0e1c174 commit b44d7bd
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions Dockerfile-QEMU-ARM
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Dockerfile for rpi-mjpg-streamer

# https://www.balena.io/docs/reference/base-images/base-images-ref/
ARG RPI=raspberrypi3

FROM balenalib/$RPI-debian:latest

COPY ./Docker/qemu-arm-* /usr/bin/

WORKDIR /

# install packages
RUN apt-get update -y && \
apt-get install -y build-essential libjpeg-dev imagemagick libv4l-dev git cmake uvcdynctrl libraspberrypi-bin

# build mjpg-streamer
RUN ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h && \
git clone https://github.com/jacksonliam/mjpg-streamer && \
cd mjpg-streamer/mjpg-streamer-experimental && \
cmake -DCMAKE_INSTALL_PREFIX:PATH=.. . && \
make install

# copy rpi-mjpg-streamer files
COPY ./ /

# arguments (default values in `.env` file)
ARG PORT
ARG RESOLUTION
ARG FPS
ARG ANGLE
ARG FLIPPED
ARG MIRRORED
ARG USERNAME
ARG PASSWORD

# environtment variables
ENV PORT=${PORT} \
RESOLUTION=${RESOLUTION} \
FPS=${FPS} \
ANGLE=${ANGLE} \
FLIPPED=${FLIPPED} \
MIRRORED=${MIRRORED} \
USERNAME=${USERNAME} \
PASSWORD=${PASSWORD}

# configure
RUN echo "{'angle': ${ANGLE}, 'flipped': ${FLIPPED}, 'mirrored': ${MIRRORED}}" \
> /www/config.json

# Open ports
EXPOSE $PORT

# Entry point for the built application
ENTRYPOINT ["/run-mjpg-streamer.docker.sh"]

0 comments on commit b44d7bd

Please sign in to comment.