Update Dockerfile
- introduced build stage to make repo and dockerfile sufficient to build - fixed version to at least python3 - used the slim python image variant for size reduction
This commit is contained in:
parent
1f86cd6294
commit
fff5bc8fd8
|
|
@ -1,9 +1,17 @@
|
||||||
FROM python
|
FROM python:3-slim AS builder
|
||||||
|
|
||||||
COPY websockify-*.tar.gz /
|
WORKDIR /build/websockify
|
||||||
|
|
||||||
RUN python3 -m pip install websockify-*.tar.gz
|
COPY ./* /build/websockify
|
||||||
RUN rm -rf /websockify-* /root/.cache
|
|
||||||
|
RUN pip3 install setuptools && \
|
||||||
|
python3 setup.py sdist --dist-dir docker/
|
||||||
|
|
||||||
|
# Actual final image
|
||||||
|
FROM python:3-slim
|
||||||
|
COPY --from=builder /build/websockify/websockify-*.tar.gz /
|
||||||
|
RUN python3 -m pip install websockify-*.tar.gz && \
|
||||||
|
rm -rf /websockify-* /root/.cache
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue