mirror of
https://github.com/dimalo/klipper-web-control-docker.git
synced 2026-01-26 00:49:08 +01:00
update Dockerfile
- add new moonraker requirements - add moonraker database folder
This commit is contained in:
@@ -9,7 +9,7 @@ ARG MOONRAKER_VENV_DIR=${HOME}/moonraker-env
|
||||
|
||||
RUN useradd -d ${HOME} -ms /bin/bash ${USER}
|
||||
RUN apt-get update && \
|
||||
apt-get install -y locales git sudo wget curl gzip tar python-virtualenv virtualenv python-dev libffi-dev libncurses-dev libusb-dev gpiod python3-virtualenv python3-dev libopenjp2-7 python3-libgpiod
|
||||
apt-get install -y locales git sudo wget curl gzip tar python-virtualenv virtualenv python-dev libffi-dev libncurses-dev libusb-dev gpiod python3-virtualenv python3-dev libopenjp2-7 python3-libgpiod liblmdb0 libsodium-dev
|
||||
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen
|
||||
RUN locale-gen
|
||||
|
||||
@@ -32,7 +32,8 @@ RUN git clone https://github.com/Arksine/moonraker.git
|
||||
RUN [ ! -d ${MOONRAKER_VENV_DIR} ] && python3 -m venv ${MOONRAKER_VENV_DIR}
|
||||
RUN ${MOONRAKER_VENV_DIR}/bin/python -m pip install pip -U
|
||||
RUN ${MOONRAKER_VENV_DIR}/bin/pip install wheel gpiod
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
|
||||
RUN ${MOONRAKER_VENV_DIR}/bin/pip install -r moonraker/scripts/moonraker-requirements.txt
|
||||
|
||||
FROM python:3.9-slim as image
|
||||
@@ -51,6 +52,8 @@ RUN apt-get update && \
|
||||
gpiod \
|
||||
libopenjp2-7 \
|
||||
rsync \
|
||||
liblmdb0 \
|
||||
libsodium-dev \
|
||||
zlib1g-dev \
|
||||
python3-libgpiod && \
|
||||
sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||
@@ -79,7 +82,7 @@ RUN useradd --user-group --no-log-init --shell /bin/false -m -d ${HOME} ${USER}
|
||||
usermod -a -G tty ${USER} && \
|
||||
usermod -a -G dialout ${USER} && \
|
||||
mkdir -p /var/log/supervisor && \
|
||||
mkdir -p /var/log/klipper && chown ${USER}:${USER} /var/log/klipper && \
|
||||
mkdir -p /var/log/klipper && chown ${USER}:${USER} /var/log/klipper ${HOME} && \
|
||||
pip install --no-cache supervisord-dependent-startup gpiod
|
||||
|
||||
RUN mkdir -p /usr/lib/python3 && ln -s /usr/local/lib/python3.9/site-packages /usr/lib/python3/dist-packages
|
||||
@@ -89,7 +92,8 @@ WORKDIR ${HOME}
|
||||
|
||||
RUN mkdir -p ${HOME}/gcode_files && \
|
||||
mkdir -p ${CONFIG_DIR} && \
|
||||
touch ${HOME}/.moonraker_api_key
|
||||
mkdir -p ${HOME}/.moonraker_database
|
||||
|
||||
VOLUME ${HOME}/gcode_files
|
||||
VOLUME ${CONFIG_DIR}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user