11FROM debian:trixie
22
3- ENV container docker
4- STOPSIGNAL SIGRTMIN+3
5- VOLUME ["/sys/fs/cgroup" ]
6-
7- # Install systemd + dependencies
8- RUN apt update && apt install -y systemd systemd-sysv dbus \
9- dpkg-dev apt-utils adduser gzip \
10- && rm -rf /var/lib/apt/lists/*
11-
12- # Copy your packages and setup repo (as before)
13- ARG OLD_PACKAGE_PATH=build/old_package
14- ARG NEW_PACKAGE_PATH=build
15- ARG APP_PACKAGE_NAME=arduino-app-cli
16- ARG ROUTER_PACKAGE_NAME=arduino-router
3+ RUN apt update && \
4+ apt install -y systemd systemd-sysv dbus \
5+ sudo docker.io ca-certificates curl gnupg \
6+ dpkg-dev apt-utils adduser gzip && \
7+ rm -rf /var/lib/apt/lists/*
8+
179ARG ARCH=arm64
1810
19- COPY ${OLD_PACKAGE_PATH}/${APP_PACKAGE_NAME}*.deb /tmp/old_app.deb
20- COPY ${NEW_PACKAGE_PATH}/${APP_PACKAGE_NAME}*.deb /tmp/new_app.deb
21- COPY ${NEW_PACKAGE_PATH}/${ROUTER_PACKAGE_NAME}*.deb /tmp/new_router.deb
11+ COPY build/stable/arduino-app-cli*.deb /tmp/stable.deb
12+ COPY build/arduino-app-cli*.deb /tmp/unstable.deb
13+ COPY build/stable/arduino-router*.deb /tmp/router.deb
14+
2215
23- RUN apt update && apt install -y /tmp/old_app .deb /tmp/new_router .deb \
24- && rm /tmp/old_app .deb \
16+ RUN apt update && apt install -y /tmp/stable .deb /tmp/router .deb \
17+ && rm /tmp/stable.deb /tmp/router .deb \
2518 && mkdir -p /var/www/html/myrepo/dists/trixie/main/binary-${ARCH} \
26- && mv /tmp/new_app.deb /var/www/html/myrepo/dists/trixie/main/binary-${ARCH}/ \
27- && mv /tmp/new_router.deb /var/www/html/myrepo/dists/trixie/main/binary-${ARCH}/
19+ && mv /tmp/unstable.deb /var/www/html/myrepo/dists/trixie/main/binary-${ARCH}/
2820
2921WORKDIR /var/www/html/myrepo
3022RUN dpkg-scanpackages dists/trixie/main/binary-${ARCH} /dev/null | gzip -9c > dists/trixie/main/binary-${ARCH}/Packages.gz
3123WORKDIR /
3224
25+
26+
3327RUN usermod -s /bin/bash arduino || true
3428RUN mkdir -p /home/arduino && chown -R arduino:arduino /home/arduino
29+ RUN usermod -aG docker arduino
30+
3531
3632
3733RUN echo "deb [trusted=yes arch=${ARCH}] file:/var/www/html/myrepo trixie main" \
3834 > /etc/apt/sources.list.d/my-mock-repo.list
3935
4036
41- VOLUME [ "/sys/fs/cgroup" ]
42-
43-
44-
4537# CMD: systemd must be PID 1
46- CMD ["/sbin/init" ]
38+ CMD ["/sbin/init" ]
0 commit comments