cagevnc/Dockerfile

39 lines
1,012 B
Text
Raw Normal View History

2022-09-23 17:33:31 +02:00
FROM binhex/arch-base:latest AS build
2022-10-23 08:00:00 +02:00
COPY ./cage-vi/ /tmp/cage/
2022-09-23 17:33:31 +02:00
RUN pacman -Syu --noconfirm base-devel \
&& chown -R nobody: /tmp/cage/ \
2022-10-02 20:39:42 +02:00
&& source /tmp/cage/PKGBUILD && pacman -S --noconfirm ${depends[@]} ${makedepends[@]} \
2022-09-23 17:33:31 +02:00
&& runuser -u nobody -- sh -c "cd /tmp/cage/ && makepkg -c --noconfirm"
FROM binhex/arch-base:latest
COPY --from=build /tmp/cage/*.pkg.tar.zst /tmp/cage/
2022-10-02 20:39:42 +02:00
COPY build/root/*.sh /root/
COPY config/ /config/
COPY supervisor/*.conf /etc/supervisor/conf.d/
2022-09-23 17:33:31 +02:00
2022-10-02 20:39:42 +02:00
RUN chmod +x /root/*.sh && \
/bin/bash /root/install.sh
2022-09-23 17:33:31 +02:00
2022-10-02 20:39:42 +02:00
# TODO, move to install.sh
ENV PUID=10000 \
PGID=10000 \
UMASK=022 \
WAYLAND_DISPLAY=wayland-0 \
XDG_RUNTIME_DIR=/run/user/${PUID} \
WLR_BACKENDS=headless \
WLR_NO_HARDWARE_CURSORS=1 \
WLR_DRM_DEVICES=/dev/dri/card0
2022-09-23 17:33:31 +02:00
2022-10-02 20:39:42 +02:00
RUN usermod -a -G seat,video,render nobody \
&& mkdir -p ${XDG_RUNTIME_DIR} \
&& chown ${PUID}:${PGID} ${XDG_RUNTIME_DIR} \
&& chmod 7700 ${XDG_RUNTIME_DIR}
2022-09-23 17:33:31 +02:00
2022-10-02 20:39:42 +02:00
EXPOSE 5900
CMD ["/bin/bash", "/usr/local/bin/init.sh"]