-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
71 lines (53 loc) · 2.64 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
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:22.04
RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apt-utils
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install ca-certificates
# COPY src/lib/basesys/etc/apt/sources.list /etc/apt/sources.list
# RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install sudo
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install xvfb
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install x11vnc
RUN groupadd -r supersudo && \
echo "%supersudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/supersudo && \
useradd -r -m -G adm,cdrom,sudo,supersudo,dip,plugdev -s /bin/bash hex
RUN mkdir -p /opt/hex/packages
USER hex
ENV HOME /home/hex
ENV USER hex
WORKDIR /home/hex
COPY src/pack/util/tools.sh /opt/hexblade/src/pack/util/tools.sh
RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/util/tools.sh install
COPY src/pack/util/graphics.sh /opt/hexblade/src/pack/util/graphics.sh
RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/util/graphics.sh xterm
RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/util/graphics.sh mousepad
COPY src/pack/openbox /opt/hexblade/src/pack/openbox
RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/openbox/openbox.sh install
RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/openbox/openbox.sh lockscreen disable
RUN echo 'x11vnc -display :99 -forever -shared -passwd 123 &' | sudo tee /etc/xdg/openbox/autostart.d/80-vnc.sh
RUN find "$HOME" -readable -exec chmod -v go+r '{}' \; && \
find "$HOME" -writable -exec chmod -v go+w '{}' \; && \
find "$HOME" -executable -exec chmod -v go+x '{}' \;
COPY docker/entrypoint /opt/hexblade/docker/entrypoint
ENV DISPLAY :99
EXPOSE 5900
ENTRYPOINT [ "/opt/hexblade/docker/entrypoint/entrypoint.sh" ]
CMD [ "hexbladestart" ]
# FROM chrome AS puppeteer
# SHELL [ "/bin/bash", "-ec" ]
# COPY src/pack/util/nvm.sh /opt/hexblade/src/pack/util/nvm.sh
# RUN DEBIAN_FRONTEND=noninteractive /opt/hexblade/src/pack/util/nvm.sh install
# ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/google-chrome
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# RUN mkdir /home/hex/workspace
# WORKDIR /home/hex/workspace
# RUN export NVM_HOME=/home/hex/.nvm && \
# source "$NVM_HOME/nvm.sh" && \
# source "$NVM_HOME/bash_completion" && \
# nvm install --lts && \
# npm install puppeteer
# COPY src/pack/util/node.sh /opt/hexblade/src/pack/util/node.sh
# RUN DEBIAN_FRONTEND=noninteractive sudo -E /opt/hexblade/src/pack/util/node.sh install
# ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/google-chrome
# ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# RUN sudo -E npm install -g puppeteer
# COPY . /opt/hexblade