| 12345678910111213141516171819202122232425262728293031323334 | FROM python:3.7 as buildimageRUN useradd -u 1000 -ms /bin/bash pythonWORKDIR /home/pythonUSER pythonRUN python -m venv /home/python/venv # "Activate" the venvENV PATH="/home/python/venv/bin:$PATH"COPY req.txt req.txtRUN pip install -r req.txtCOPY jam.h jam.hCOPY jamlib.a jamlib.aCOPY jamlib_build.py jamlib_build.pyRUN python jamlib_build.pyRUN pip wheel --wheel-dir=/home/python/wheels -r req.txtRUN find .RUN ls -laRUN pip freezeFROM python:3.7-slim RUN useradd -u 1000 -ms /bin/bash python # && \# apt update && \# apt install -y gitWORKDIR /home/pythonUSER pythonRUN python -m venv /home/python/venv # "Activate" the venvENV PATH="/home/python/venv/bin:$PATH"COPY --from=buildimage /home/python/wheels /home/python/wheelsCOPY req.txt req.txtRUN pip install --no-index --find-links=/home/python/wheels -r req.txtCOPY --from=buildimage /home/python/_pi_cffi.* /home/python/# COPY --from=buildimage /home/python/venv/lib/python3.7/site-packages/.libs_cffi_backend /home/python/venv/lib/python3.7/site-packages/# CMD ["python", "tcp-proxy.py"]
 |