This repository has been archived on 2024-11-12. You can view files and clone it, but cannot push or open issues or pull requests.
iac/printers/Dockerfile

29 lines
1.1 KiB
Text
Raw Normal View History

2024-06-27 21:17:13 +00:00
FROM octoprint/octoprint AS octoprint
2024-06-28 18:08:55 +00:00
RUN apt-get update -q && \
apt-get install -yq --no-install-recommends \
2024-06-27 21:17:13 +00:00
cpulimit \
sudo \
curl wget \
unzip \
nano \
&& \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log
FROM octoprint AS mjpg-streamer-builder
WORKDIR /build
2024-06-28 18:08:55 +00:00
RUN apt-get update -q && \
apt-get install -yq --no-install-recommends \
unzip \
subversion
2024-06-27 21:17:13 +00:00
RUN curl -s -L https://github.com/pranjalv123/mjpg-streamer-yu12/archive/refs/heads/master.zip --output mjpeg-streamer-yu12.zip && \
2024-06-28 18:08:55 +00:00
unzip -q mjpeg-streamer-yu12.zip \
WORKDIR /build/mjpg-streamer-yu12-master/mjpg-streamer
RUN make && \
2024-06-27 21:17:13 +00:00
ls -lah
FROM octoprint AS octoprint-mjpg-streamer
COPY --from=mjpg-streamer-builder /build/mjpg-streamer-yu12-master/mjpg-streamer/mjpg_streamer /usr/local/bin/mjpg_streamer
COPY --from=mjpg-streamer-builder /build/mjpg-streamer-yu12-master/mjpg-streamer/*.so /usr/local/lib/mjpg-streamer/