48 lines
1.3 KiB
Docker
48 lines
1.3 KiB
Docker
FROM python
|
|
|
|
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/*
|
|
RUN wget --content-disposition -P / $(curl https://api.github.com/repos/novnc/websockify/releases/latest | jq -r '.tarball_url')
|
|
RUN python3 -m pip install novnc-websockify-*.tar.gz
|
|
RUN rm -rf /novnc-websockify-* /root/.cache
|
|
|
|
RUN wget --content-disposition -P / https://github.com/rickparrish/fTelnet/archive/refs/heads/master.zip
|
|
WORKDIR /web
|
|
RUN unzip /fTelnet-master.zip &&\
|
|
cp fTelnet-master/release/ftelnet.css . &&\
|
|
cp fTelnet-master/release/ftelnet.norip.xfer.min.js . &&\
|
|
cp -r fTelnet-master/release/fonts fTelnet-master/release/keyboard . &&\
|
|
rm -rf /fTelnet-master.zip fTelnet-master
|
|
ADD web/index.html web/custom.css /web
|
|
|
|
VOLUME /data
|
|
|
|
EXPOSE 80
|
|
|
|
WORKDIR /opt/websockify
|
|
|
|
ENV WSHOST="window.location.hostname"
|
|
ENV WSPORT="80"
|
|
ENV DEST="box.imzadi.de:23"
|
|
ENV OPTS="--web /web"
|
|
|
|
RUN cat <<'EOF' > /entrypoint.sh
|
|
#!/bin/sh
|
|
echo "Websockify Container"
|
|
echo "--------------------"
|
|
echo "Container Host : $WSHOST"
|
|
echo "Container Port : $WSPORT"
|
|
echo "Destination : $DEST"
|
|
echo "Options : $OPTS"
|
|
/usr/local/bin/websockify $OPTS 80 $DEST
|
|
EOF
|
|
|
|
RUN cat <<'EOF' > /web/config.js
|
|
var wshost=$WSHOST;
|
|
var wsport=$WSPORT;
|
|
EOF
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|