forked from rogerrum/docker-oscar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
57 lines (43 loc) · 1.97 KB
/
Dockerfile
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
53
54
55
56
57
FROM debian:bookworm-slim AS easy-novnc-build
WORKDIR /src
RUN go mod init build && \
go get github.com/geek1011/[email protected] && \
go build -o /bin/easy-novnc github.com/geek1011/easy-novnc
FROM debian:bullseye
ARG TARGETPLATFORM
ARG TARGETARCH
ARG TARGETVARIANT
RUN printf '..%s..' "I'm building for TARGETPLATFORM=${TARGETPLATFORM}" \
&& printf '..%s..' ", TARGETARCH=${TARGETARCH}" \
&& printf '..%s..' ", TARGETVARIANT=${TARGETVARIANT} \n"
RUN apt-get update -y && \
apt-get install -y --no-install-recommends openbox tigervnc-standalone-server supervisor gosu cron && \
rm -rf /var/lib/apt/lists && \
mkdir -p /usr/share/desktop-directories
RUN apt-get update -y && \
apt-get install -y --no-install-recommends lxterminal nano wget openssh-client rsync ca-certificates xdg-utils htop tar xzip gzip bzip2 zip unzip && \
rm -rf /var/lib/apt/lists
RUN if [ "${TARGETARCH}" = "arm64" ]; then \
wget -q -O /tmp/oscar.deb https://www.apneaboard.com/OSCAR/1.5.3/oscar_1.5.3-RasPiOS-12_arm64.deb; \
else \
wget -q -O /tmp/oscar.deb https://www.apneaboard.com/OSCAR/1.5.3/oscar_1.5.3-RasPiOS-12_armhf.deb; \
fi
RUN apt-get update -y && \
apt install -y /tmp/oscar.deb && \
rm /tmp/oscar.deb && \
rm -rf /var/lib/apt/lists
COPY --from=easy-novnc-build /bin/easy-novnc /usr/local/bin/
COPY menu.xml /etc/xdg/openbox/
COPY supervisord.conf /etc/
# Adding Script to download from ezShare and setting up th Cron
COPY ezShareDownloader.sh /opt/src/scripts/ezShareDownloader.sh
RUN chmod 777 /opt/src/scripts/ezShareDownloader.sh
COPY create_cron.sh /opt/src/scripts/create_cron.sh
RUN chmod 777 /opt/src/scripts/create_cron.sh
EXPOSE 8080
RUN groupadd --gid 1000 app && \
useradd --home-dir /data --shell /bin/bash --uid 1000 --gid 1000 app && \
mkdir -p /data \
mkdir -p /SDCARD
#VOLUME /data
CMD ["sh", "-c", "/opt/src/scripts/create_cron.sh && chown app:app /data /dev/stdout /SDCARD && exec gosu app supervisord"]