Skip to content

Commit 4f9d496

Browse files
committed
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.
1 parent 1979e92 commit 4f9d496

File tree

4 files changed

+11
-18
lines changed

4 files changed

+11
-18
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ The entrypoint of the image is the `run` command.
178178

179179
To build the image:
180180
```
181-
cd docker
182-
docker build -t novnc/websockify .
181+
./docker/build.sh
183182
```
184183

185184
Once built you can just launch it with the same

docker/Dockerfile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
FROM python:3.6
1+
FROM python
22

3-
ENV VERSION 0.10.0
3+
COPY websockify-*.tar.gz /
44

5-
RUN mkdir -p /opt/websockify \
6-
&& curl -SL https://github.com/novnc/websockify/archive/refs/tags/v$VERSION.tar.gz \
7-
| tar xzC /opt/websockify
8-
9-
RUN python -m pip install 'numpy<1.17' redis simplejson jwcrypto requests
5+
RUN python3 -m pip install websockify-*.tar.gz
6+
RUN rm -rf /websockify-* /root/.cache
107

118
VOLUME /data
129

@@ -15,7 +12,5 @@ EXPOSE 443
1512

1613
WORKDIR /opt/websockify
1714

18-
COPY docker-entrypoint.sh /
19-
20-
ENTRYPOINT ["/docker-entrypoint.sh"]
15+
ENTRYPOINT ["/usr/local/bin/websockify"]
2116
CMD ["--help"]

docker/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env sh
2+
set -e -x
3+
cd "$(dirname "$0")"
4+
(cd .. && python3 setup.py sdist --dist-dir docker/)
5+
docker build -t novnc/websockify .

docker/docker-entrypoint.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)