mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-17 21:26:21 +00:00
Minor updates
This commit is contained in:
parent
59c77784f3
commit
8339e4b668
7 changed files with 30 additions and 92 deletions
23
novnc/02-ssh.sh
Executable file
23
novnc/02-ssh.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
# Check for client variables
|
||||
if ! [ ${MYVNC_VNCSSH_HOST} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_HOST is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [ ${MYVNC_VNCSSH_PORT} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_PORT is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ ${MYVNC_VNCSSH_PORT} =~ ^[0-9]+$ ]]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_PORT is invalid."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read ssh client variables hostname and port (5900, 5901, 5902, etc)
|
||||
ssh ${MYVNC_VNCSSH_HOST} -L ${MYVNC_VNCLISTEN_PORT:-5900}:localhost:${MYVNC_VNCSSH_PORT} &
|
||||
|
|
@ -2,39 +2,17 @@
|
|||
FROM myvnc/base
|
||||
USER root
|
||||
|
||||
# Build ARG for additional packages to install (eg, openssh)
|
||||
ARG addpkg
|
||||
# Build ARG: use "root" for debugging
|
||||
ARG debug
|
||||
|
||||
# Install ssh client
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache \
|
||||
openssh-client \
|
||||
&& <<-'01-init' cat >>/app/init.d/01-init.sh
|
||||
openssh-client
|
||||
|
||||
# Check for client variables
|
||||
if ! [ ${MYVNC_VNCSSH_HOST} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_HOST is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [ ${MYVNC_VNCSSH_PORT} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_PORT is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ ${MYVNC_VNCSSH_PORT} =~ ^[0-9]+$ ]]
|
||||
then
|
||||
echo "Variable MYVNC_VNCSSH_PORT is invalid."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read ssh client variables hostname and port (5900, 5901, 5902, etc)
|
||||
ssh ${MYVNC_VNCSSH_HOST} -L ${MYVNC_VNCLISTEN_PORT:-5900}:localhost:${MYVNC_VNCSSH_PORT} &
|
||||
01-init
|
||||
# Tigervnc
|
||||
COPY *.sh /app/init.d/
|
||||
|
||||
# Default environment
|
||||
USER ${debug:-user}
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Remmina config
|
||||
cat >~/.config/i3/config.d/remmina.conf <<- 'remmina.conf'
|
||||
# Open terminal
|
||||
exec --no-startup-id i3-msg 'workspace "2"; exec ${TERMINAL}'
|
||||
|
||||
# Maximize
|
||||
for_window [class="remmina"] move container to workspace "1"
|
||||
for_window [class="${TERMINAL}"] move container to workspace "2"
|
||||
remmina.conf
|
||||
|
||||
# Remmina startup
|
||||
install /dev/stdin ~/.config/i3/startapp.sh <<- startapp.sh
|
||||
#!/usr/bin/env bash
|
||||
# Run remmina
|
||||
while true
|
||||
do
|
||||
remmina
|
||||
done
|
||||
startapp.sh
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# syntax = docker/dockerfile:1
|
||||
FROM myvnc/base:i3
|
||||
USER root
|
||||
|
||||
# Choose a terminal
|
||||
ENV TERMINAL=xterm
|
||||
|
||||
# Install packages
|
||||
RUN apk add --no-cache \
|
||||
openssh \
|
||||
remmina \
|
||||
${TERMINAL}
|
||||
|
||||
# Tigervnc
|
||||
COPY *.sh /app/init.d/
|
||||
RUN chmod +x /app/init.d/*
|
||||
|
||||
# Reset user home directory
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Docker build
|
||||
# Optional buildtag
|
||||
DOCKER_BUILDKIT=1 docker build . \
|
||||
--tag ${buildtag:-myvnc/remmina}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
services:
|
||||
remmina:
|
||||
image: myvnc/remmina
|
||||
container_name: remmina
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- ${MYVNC_REMMINA_PORT}:6900
|
||||
environment:
|
||||
MYVNC_CUSTOM_TITLE: ${MYVNC_REMMINA_CUSTOM_TITLE}
|
||||
MYVNC_VNCPASS: ${MYVNC_REMMINA_VNCPASS}
|
||||
MYVNC_PROXYPATH: ${MYVNC_REMMINA_PROXYPATH}
|
||||
MYVNC_VNCSHARING: ${MYVNC_REMMINA_VNCSHARING}
|
||||
networks:
|
||||
- remmina
|
||||
|
||||
networks:
|
||||
remmina:
|
||||
external: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue