-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (39 loc) · 1.7 KB
/
Dockerfile
File metadata and controls
47 lines (39 loc) · 1.7 KB
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
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive \
FSVIEWER_VERSION=2.5.1
LABEL org.opencontainers.image.version="${FSVIEWER_VERSION}" \
org.opencontainers.image.title="FeelingSurf Viewer" \
org.opencontainers.image.description="FeelingSurf Viewer in a container" \
org.opencontainers.image.vendor="FeelingSurf" \
org.opencontainers.image.source="https://github.com/feelingsurf/viewer" \
org.opencontainers.image.url="https://www.feelingsurf.fr"
# Install dependencies, create user, and install FeelingSurf Viewer
RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
ca-certificates \
wget \
libasound2 \
libgbm1 \
libgtk-3-0 \
libnotify4 \
libnss3 \
libsecret-1-0 \
libxss1 \
libxtst6 \
xdg-utils \
xvfb \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& groupadd -r fsviewer \
&& useradd -rm -g fsviewer -G audio fsviewer \
&& echo 'pcm.!default {\n type plug\n slave.pcm "null"\n}' > /etc/asound.conf \
&& arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& wget -q https://github.com/feelingsurf/viewer/releases/download/${FSVIEWER_VERSION}/FeelingSurfViewer-linux-${arch}-${FSVIEWER_VERSION}.deb \
&& dpkg -i FeelingSurfViewer-linux-${arch}-${FSVIEWER_VERSION}.deb \
&& rm FeelingSurfViewer-linux-${arch}-${FSVIEWER_VERSION}.deb \
&& rm -rf /usr/share/doc/* /usr/share/man/* /var/cache/debconf/* /tmp/* /var/tmp/*
WORKDIR /home/fsviewer
COPY --chmod=755 run.sh /run.sh
USER fsviewer
HEALTHCHECK --interval=1m --timeout=3s --start-period=30s \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1
ENTRYPOINT ["/run.sh"]