better configuration
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -20,18 +20,25 @@ EXPOSE 80
|
||||
|
||||
WORKDIR /opt/websockify
|
||||
|
||||
ENV LOCALPORT="80"
|
||||
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"
|
||||
echo "----------"
|
||||
echo "Options : $OPTS"
|
||||
echo "Local Port : $LOCALPORT"
|
||||
echo "Destination: $DEST"
|
||||
/usr/local/bin/websockify $OPTS $LOCALPORT $DEST
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user