Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use latest chrome #35

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 38 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,43 @@ ENV VNC_SCREEN_SIZE=1024x768

COPY copyables /

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
gnupg2 \
fonts-noto-cjk \
pulseaudio \
supervisor \
x11vnc \
fluxbox \
eterm

ADD https://dl.google.com/linux/linux_signing_key.pub \
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb \
/tmp/

RUN apt-key add /tmp/linux_signing_key.pub \
&& dpkg -i /tmp/google-chrome-stable_current_amd64.deb \
|| dpkg -i /tmp/chrome-remote-desktop_current_amd64.deb \
|| DEBIAN_FRONTEND=noninteractive apt-get -f --yes install

RUN apt-get clean \
&& rm -rf /var/cache/* /var/log/apt/* /var/lib/apt/lists/* /tmp/* \
&& useradd -m -G chrome-remote-desktop,pulse-access chrome \
&& usermod -s /bin/bash chrome \
&& ln -s /crdonly /usr/local/sbin/crdonly \
&& ln -s /update /usr/local/sbin/update \
&& mkdir -p /home/chrome/.config/chrome-remote-desktop \
&& mkdir -p /home/chrome/.fluxbox \
&& echo ' \n\
session.screen0.toolbar.visible: false\n\
session.screen0.fullMaximization: true\n\
session.screen0.maxDisableResize: true\n\
session.screen0.maxDisableMove: true\n\
session.screen0.defaultDeco: NONE\n\
' >> /home/chrome/.fluxbox/init \
&& chown -R chrome:chrome /home/chrome/.config /home/chrome/.fluxbox
# Update packages, install essential dependencies, and clean up
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
gnupg2 \
fonts-noto-cjk \
pulseaudio \
supervisor \
x11vnc \
fluxbox \
eterm \
wget && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
rm -rf /var/cache/* /var/log/apt/* /tmp/*

# Install Latest Google Chrome and Chrome Remote Desktop
RUN wget --no-check-certificate -O /tmp/google-chrome-stable.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
wget --no-check-certificate -O /tmp/chrome-remote-desktop.deb https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb && \
apt-get update && \
apt-get install -y --no-install-recommends /tmp/google-chrome-stable.deb /tmp/chrome-remote-desktop.deb && \
rm /tmp/google-chrome-stable.deb /tmp/chrome-remote-desktop.deb

# Configure the environment
RUN useradd -m -G chrome-remote-desktop,pulse-access chrome && \
usermod -s /bin/bash chrome && \
ln -s /crdonly /usr/local/sbin/crdonly && \
ln -s /update /usr/local/sbin/update && \
mkdir -p /home/chrome/.config/chrome-remote-desktop /home/chrome/.fluxbox && \
echo ' \n\
session.screen0.toolbar.visible: false\n\
session.screen0.fullMaximization: true\n\
session.screen0.maxDisableResize: true\n\
session.screen0.maxDisableMove: true\n\
session.screen0.defaultDeco: NONE\n\
' >> /home/chrome/.fluxbox/init && \
chown -R chrome:chrome /home/chrome/.config /home/chrome/.fluxbox

USER chrome

Expand All @@ -55,4 +54,4 @@ EXPOSE 5900

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.9'

services:
chrome-docker:
build:
context: .
dockerfile: Dockerfile
environment:
VNC_SCREEN_SIZE: 1024x768
VNC_PASSWORD: your_password
volumes:
- chrome_data:/home/chrome
ports:
- "5900:5900"
restart: unless-stopped

volumes:
chrome_data:
Loading