set python version for octoprint image; add runtime packages for octoprint

This commit is contained in:
Markus Küffner
2021-11-08 22:21:28 +01:00
parent a1c0802cf5
commit cfb81ae091
3 changed files with 15 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
ARG PYTHON_VERSION=3.9
## Install OctoPrint and Plugins in venv
FROM python:3 as build
FROM python:${PYTHON_VERSION} as build
ARG VERSION=1.7.2
@@ -10,7 +12,7 @@ RUN python -m venv venv \
&& venv/bin/pip install -r plugins.txt
## Runtime Image
FROM python:3-slim as run
FROM python:${PYTHON_VERSION}-slim as run
WORKDIR /opt
COPY --from=build /opt/venv venv
@@ -30,4 +32,4 @@ RUN groupadd octoprint --gid 1000 \
EXPOSE 5000
VOLUME ["/opt/run", "/opt/cfg"]
ENTRYPOINT ["/opt/venv/bin/octoprint", "serve"]
CMD ["-b", "/opt/cfg"]
CMD ["-b", "/opt/cfg"]

View File

@@ -1,5 +1,5 @@
# FilamentManager
psycopg2
# PrusaSlicerThumbnails
libjpeg62-turbo
libopenjp2-7
libjpeg62-turbo
libtiff5
libxcb1

View File

@@ -1,7 +1,12 @@
#!/bin/bash
## https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/
## Setup for building multiplatform images
##
## apt install qemu-user-static
## docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
## docker buildx create --use --name cross
## docker buildx inspect --bootstrap
## docker buildx build --platform linux/amd64,linux/arm/v7 -t octoprint:latest --target run .
set -e