-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.amd64
52 lines (43 loc) · 1.47 KB
/
Dockerfile.amd64
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
ARG BASE_IMAGE=docker.io/library/ubuntu:24.04
ARG BASE_DIGEST=sha256:c920ba4cfca05503764b785c16b76d43c83a6df8d1ab107e7e6610000d94315c
FROM ${BASE_IMAGE}@${BASE_DIGEST}
ARG GIT_SOURCE
ARG GIT_COMMIT
ARG AUTHORS=kaszpir@gmail.com
ARG URL=https://nvtkaszpir.github.io/prusa-connect-camera-script
# hadolint ignore=DL3008
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
ffmpeg \
fswebcam \
git \
iputils-ping \
uuid-runtime \
v4l-utils \
&& apt-get clean \
&& rm -rf /var/cache/apt
WORKDIR /app
RUN groupadd app && \
useradd -ms /bin/bash app -g nogroup && \
usermod -a -G video app && \
chown -R app:video /app
USER app
COPY LICENSE /app/
COPY prusa-connect-camera.sh /app/
# COPY entrypoint.sh /app/
# allow spawning shell
ENTRYPOINT [ ]
CMD [ "/app/prusa-connect-camera.sh" ]
# we assume we get a picture at least once per minute
HEALTHCHECK --interval=60s --timeout=3s \
CMD test $(find /dev/shm/ -mmin -1 | wc -l) -gt 0
LABEL org.opencontainers.image.base.name="${BASE_IMAGE}"
LABEL org.opencontainers.image.base.digest="${BASE_DIGEST}"
LABEL org.opencontainers.image.description="Linux shell script to send still camera images to Prusa Connect"
LABEL org.opencontainers.image.revision="${GIT_COMMIT}"
LABEL org.opencontainers.image.source="${GIT_SOURCE}"
LABEL org.opencontainers.image.url="${URL}"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.authors="${AUTHORS}"