Files
barcode_reader_pc/docker/linux-appimage.Dockerfile
T
brontomark 5ae45d615e
Build and Release Barcode Reader Server (Multi-Platform) / build-linux (push) Successful in 2m44s
Build and Release Barcode Reader Server (Multi-Platform) / build-macos (push) Successful in 1m8s
Build and Release Barcode Reader Server (Multi-Platform) / build-windows (push) Successful in 3m50s
fix linux
2026-11-22 11:14:15 +01:00

64 lines
1.7 KiB
Docker

FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
binutils \
build-essential \
ca-certificates \
curl \
file \
libdbus-1-3 \
libegl1 \
libfontconfig1 \
libgl1 \
libglib2.0-0 \
libx11-6 \
libxcb-cursor0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-shape0 \
libxcb-xinerama0 \
libxcb-xkb1 \
libxkbcommon0 \
libxkbcommon-x11-0 \
libxtst6 \
patchelf \
python3 \
python3-dev \
python3-pip \
python3-venv \
tar \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Pre-crea il venv Python e installa le dipendenze in cache layer Docker
RUN python3 -m venv /opt/venv
ENV VIRTUAL_ENV="/opt/venv"
ENV PATH="/opt/venv/bin:${PATH}"
COPY server/requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r /tmp/requirements.txt pyinstaller \
&& rm -f /tmp/requirements.txt
# Estrae appimagetool per funzionare senza FUSE dentro Docker
RUN curl -fsSL -o /tmp/appimagetool.AppImage \
https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage \
&& chmod +x /tmp/appimagetool.AppImage \
&& cd /opt \
&& /tmp/appimagetool.AppImage --appimage-extract \
&& mv /opt/squashfs-root /opt/appimagetool \
&& ln -s /opt/appimagetool/AppRun /usr/local/bin/appimagetool \
&& rm -f /tmp/appimagetool.AppImage
COPY docker/build-linux-appimage.sh /usr/local/bin/build-linux-appimage.sh
RUN chmod +x /usr/local/bin/build-linux-appimage.sh
WORKDIR /workspace
ENTRYPOINT ["/usr/local/bin/build-linux-appimage.sh"]