VNCPASSWORD in BUILD_ARG

This commit is contained in:
luisgulo 2023-06-24 02:20:48 +02:00
parent bc6b4f3b6c
commit b59ea659d4
2 changed files with 15 additions and 4 deletions

View file

@ -21,9 +21,13 @@ RUN echo \
RUN apt-get -y update && apt-get -y install firefox
# Install Desktop
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install -f mate-desktop-environment mate-desktop-environment-core mate-desktop-environment-extras tightvncserver
# Password for VNC connection in ARG-BUILD ('debian' by default)
ARG VNCPASSWORD=debian
# VNC Auth
RUN mkdir /root/.vnc && \
echo "debian"|vncpasswd -f > /root/.vnc/passwd && \
echo "$VNCPASSWORD"|vncpasswd -f > /root/.vnc/passwd && \
chmod 0600 /root/.vnc/passwd
RUN touch /root/.Xresources
# VNC Port

View file

@ -5,15 +5,22 @@ STEPS:
1. Clone repo:
` git clone https://gitea.soloconlinux.org.es/DOCKER/debian-desktop.git `
---
2. Build image
2. Build image:
a. Password by default:
` docker build --tag debian-mate:12 . `
b. Your password... (example: 'MyXtrangePassword')
` docker build --tag debian-mate:12 --build-arg VNCPASSWORD=MyXtrangePassword . `
---
3. Run container with VNC port:
` docker run -d -ti --name desktop -v /dev/shm:/dev/shm -p 5901:5901 debian-mate:12 `
---
4. Connect with VNC Client/Viewer in your new Debian Desktop Container
4.1. Obtain IP of container:
@ -24,4 +31,4 @@ STEPS:
`vncviewer IP-Container:1 `
Password for VNC connect is **debian**
NOTE: Password by default for VNC connect is **debian**