summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2022-12-16 13:04:24 +0100
committerPierre Ossman <ossman@cendio.se>2022-12-16 13:10:58 +0100
commit4f9d496dfeb3805d5029fe5dc18bf86268e0397b (patch)
tree11cebce9309bd680d7857f181d103b20a9d01bf8 /docker
parent1979e92f0e6c414a02ff955e51d7f71f189548e4 (diff)
downloadwebsockify-4f9d496dfeb3805d5029fe5dc18bf86268e0397b.tar.gz
Use local websockify when building container
It's very surprising to get some external copy of websockify when you are building an image in your local websockify source tree. Make sure we are using the local copy of everything.
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile15
-rwxr-xr-xdocker/build.sh5
-rwxr-xr-xdocker/docker-entrypoint.sh6
3 files changed, 10 insertions, 16 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index f9cb72b..1ae078b 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,12 +1,9 @@
-FROM python:3.6
+FROM python
-ENV VERSION 0.10.0
+COPY websockify-*.tar.gz /
-RUN mkdir -p /opt/websockify \
- && curl -SL https://github.com/novnc/websockify/archive/refs/tags/v$VERSION.tar.gz \
- | tar xzC /opt/websockify
-
-RUN python -m pip install 'numpy<1.17' redis simplejson jwcrypto requests
+RUN python3 -m pip install websockify-*.tar.gz
+RUN rm -rf /websockify-* /root/.cache
VOLUME /data
@@ -15,7 +12,5 @@ EXPOSE 443
WORKDIR /opt/websockify
-COPY docker-entrypoint.sh /
-
-ENTRYPOINT ["/docker-entrypoint.sh"]
+ENTRYPOINT ["/usr/local/bin/websockify"]
CMD ["--help"]
diff --git a/docker/build.sh b/docker/build.sh
new file mode 100755
index 0000000..1f85626
--- /dev/null
+++ b/docker/build.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env sh
+set -e -x
+cd "$(dirname "$0")"
+(cd .. && python3 setup.py sdist --dist-dir docker/)
+docker build -t novnc/websockify .
diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh
deleted file mode 100755
index 1178553..0000000
--- a/docker/docker-entrypoint.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-set -e
-
-/opt/websockify/websockify-$VERSION/run "$@"