dkr002 - Docker GUI image

Dockerfile updated to work with xfce4+TigerVNC
	 zenith TUI runs from the docker image console
	 zenith GUI is not ready
This commit is contained in:
Rene V. Vergara A. 2024-06-23 09:32:23 -04:00
parent a6fb08cded
commit 7745aa5256
8 changed files with 113 additions and 17 deletions

View file

@ -221,7 +221,7 @@ main = do
" ______ _ _ _ \n |___ / (_) | | | \n / / ___ _ __ _| |_| |__ \n / / / _ \\ '_ \\| | __| '_ \\ \n / /_| __/ | | | | |_| | | |\n /_____\\___|_| |_|_|\\__|_| |_|\n Zcash Full Node CLI v0.4.0" " ______ _ _ _ \n |___ / (_) | | | \n / / ___ _ __ _| |_| |__ \n / / / _ \\ '_ \\| | __| '_ \\ \n / /_| __/ | | | | |_| | | |\n /_____\\___|_| |_|_|\\__|_| |_|\n Zcash Full Node CLI v0.4.0"
} }
(root nodeUser nodePwd) (root nodeUser nodePwd)
"cli" -> runZenithCLI myConfig "tui" -> runZenithCLI myConfig
"gui" -> runZenithGUI myConfig "gui" -> runZenithGUI myConfig
"rescan" -> clearSync myConfig "rescan" -> clearSync myConfig
_ -> printUsage _ -> printUsage
@ -232,5 +232,6 @@ printUsage = do
putStrLn "zenith [command] [parameters]\n" putStrLn "zenith [command] [parameters]\n"
putStrLn "Available commands:" putStrLn "Available commands:"
putStrLn "legacy\tLegacy CLI for zcashd" putStrLn "legacy\tLegacy CLI for zcashd"
putStrLn "cli\tCLI for zebrad" putStrLn "tui\tTUI for zebrad"
putStrLn "gui\tGUI for zebrad"
putStrLn "rescan\tRescan the existing wallet(s)" putStrLn "rescan\tRescan the existing wallet(s)"

View file

@ -7,30 +7,40 @@ RUN apt update
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install necessary packages # Update the package list and install necessary packages
RUN apt-get update && apt-get install -y \ RUN apt-get install -y \
sudo \
xfce4 \ xfce4 \
xfce4-goodies \ xfce4-goodies \
x11vnc \ tigervnc-standalone-server \
xvfb \ tigervnc-common \
novnc \ xfonts-base \
net-tools \ xterm \
curl \ wget
wget \
vim \
git
RUN apt-get install -y \ RUN apt-get install -y \
libxss-dev \ libxss-dev \
libxrandr-dev \ libxrandr-dev \
libsecp256k1-dev \ libsecp256k1-dev \
xclip xclip \
libglew-dev \
libsdl2-dev
RUN apt-get clean \ RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN mkdir /home/zenith # Create a new user (e.g., "zenusr") and set a password
RUN useradd -ms /bin/bash zenusr RUN useradd -ms /bin/bash zenusr
RUN echo "1234\n1234\n" | passwd zenusr
RUN usermod -aG sudo zenusr
# Configure VNC server
RUN mkdir -p /home/zenusr/.vnc
RUN echo "vnc1234" | vncpasswd -f > /home/zenusr/.vnc/passwd
RUN chmod 600 /home/zenusr/.vnc/passwd
# Create startup script for VNC seriver
RUN echo -e '#!/bin/bash\nxrdb $HOME/.Xresources\nstartxfce4 &' > /home/zenusr/.vnc/xstartup
RUN chmod +x /home/zenusr/.vnc/xstartup
RUN chown zenusr:zenusr -R /home/zenusr/.vnc
COPY bash_rc_adm /root/.bashrc COPY bash_rc_adm /root/.bashrc
COPY bash_rc_usr /home/zenusr/.bashrc COPY bash_rc_usr /home/zenusr/.bashrc
@ -38,5 +48,21 @@ COPY zenith /usr/local/bin
COPY librustzcash_wrapper.so /usr/local/lib COPY librustzcash_wrapper.so /usr/local/lib
COPY sapling-spend.params /usr/local/lib COPY sapling-spend.params /usr/local/lib
COPY sapling-output.params /usr/local/lib COPY sapling-output.params /usr/local/lib
COPY libc-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
COPY libc-dev-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
COPY libc6_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
RUN echo -e '#!/bin/bash\ncd /home/zenusr/Downloads\ndpkg -i libc6_2.38-1ubuntu6_amd64.deb libc-bin_2.38-1ubuntu6_amd64.deb libc-dev-bin_2.38-1ubuntu6_amd64.deb' > /usr/local/bin/updlibc
RUN chmod +x /usr/local/bin/updlibc
RUN updlibc
RUN echo -e '#!/bin/bash\nvncserver -geometry 1360x768 -depth 24' > /usr/local/bin/startvnc
RUN chmod +x /usr/local/bin/startvnc
# Set the user to "zenusr"
USER zenusr
WORKDIR /home/zenusr
ENV USER=zenusr
CMD ["/bin/bash"] CMD ["/bin/bash"]

View file

@ -0,0 +1,69 @@
FROM ubuntu:22.04
MAINTAINER Rene V. Vergara A. <rvergara59@kprotonmail.com>
RUN apt update
# Set environment variables to non-interactive mode for installation
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install necessary packages
RUN apt-get install -y \
xfce4 \
xfce4-goodies \
tightvncserver \
xterm \
wget
# Install your GUI application (example: Firefox)
# RUN apt-get install -y firefox
RUN apt-get install -y \
libxss-dev \
libxrandr-dev \
libsecp256k1-dev \
xclip \
libglew-dev \
libsdl2-dev
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create a new user (e.g., "zenusr") and set a password
RUN useradd -ms /bin/bash zenusr
RUN echo "1234\n1234\n" | passwd zenusr
RUN usermod -aG sudo zenusr
# Configure VNC server
RUN mkdir -p /home/zenusr/.vnc
RUN echo "vnc1234" | vncpasswd -f > /home/zenusr/.vnc/passwd
RUN chmod 600 /home/zenusr/.vnc/passwd
# Create startup script for VNC seriver
RUN echo -e '#!/bin/bash\nxrdb $HOME/.Xresources\nstartxfce4 &' > /home/zenusr/.vnc/xstartup
RUN chmod +x /home/zenusr/.vnc/xstartup
RUN chown zenusr:zenusr -R /home/zenusr/.vnc
COPY bash_rc_adm /root/.bashrc
COPY bash_rc_usr /home/zenusr/.bashrc
COPY zenith /usr/local/bin
COPY librustzcash_wrapper.so /usr/local/lib
COPY sapling-spend.params /usr/local/lib
COPY sapling-output.params /usr/local/lib
COPY libc-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
COPY libc-dev-bin_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
COPY libc6_2.38-1ubuntu6_amd64.deb /home/zenusr/Downloads/
RUN echo -e '#!/bin/bash\ncd /home/zenusr/Downloads\ndpkg -i libc6_2.38-1ubuntu6_amd64.deb libc-bin_2.38-1ubuntu6_amd64.deb libc-dev-bin_2.38-1ubuntu6_amd64.deb' > /usr/local/bin/updlibc
RUN chmod +x /usr/local/bin/updlibc
RUN updlibc
RUN echo -e '#!/bin/bash\nvncserver -geometry 1360x768 -depth 24' > /usr/local/bin/startvnc
RUN chmod +x /usr/local/bin/startvnc
# Set the user to "zenusr"
USER zenusr
WORKDIR /home/zenusr
ENV USER=zenusr
CMD ["/bin/bash"]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
ZFOLDER=~/Public/zenith ZFOLDER=~/Zenith
IMAGE_NAME=zenith-docker-gui:0.5.3.0 IMAGE_NAME=zenith-docker-gui:0.5.3.0
# Check if data folder exists # Check if data folder exists

Binary file not shown.