Skip to content

Commit 94e3831

Browse files
committed
fix: resolve four Dockerfile ponytail issues (H1-H4)
H1: Pin FROM debian:trixie to @sha256 digest for reproducible builds H2: Remove apt-get upgrade -y (base image already ships known-good packages) H3: Pin debos go install to v1.1.7 instead of @latest H4: Replace shell-form ENTRYPOINT with exec-form + entrypoint.sh with BUILD_TARGET support
1 parent bd59b72 commit 94e3831

2 files changed

Lines changed: 39 additions & 6 deletions

File tree

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:trixie
1+
FROM debian:trixie@sha256:3a953985c225a97dfb5a8f1ddc6a3ecefefc35ef51f537075e08941305045a1e
22

33
# Set environment variables
44
ENV DEBIAN_FRONTEND=noninteractive
@@ -10,9 +10,6 @@ ENV LINUX_OUT=/artifacts/linux
1010
# Add arm64 architecture for cross-compilation
1111
RUN dpkg --add-architecture arm64 && apt-get update
1212

13-
# Upgrade base system
14-
RUN apt-get upgrade -y
15-
1613
# Prerequisites
1714
RUN apt-get install -y \
1815
git \
@@ -51,7 +48,7 @@ RUN apt-get install -y \
5148
libostree-dev \
5249
fakemachine
5350

54-
RUN go install -v github.com/go-debos/debos/cmd/debos@latest
51+
RUN go install -v github.com/go-debos/debos/cmd/debos@v1.1.7
5552

5653
RUN install -m 755 ~/go/bin/debos /usr/local/bin
5754

@@ -70,4 +67,7 @@ WORKDIR /flipperone-linux-build-scripts
7067
RUN git clone --depth=1 https://github.com/flipperdevices/flipperone-linux-build-scripts .
7168

7269
# Entry point
73-
ENTRYPOINT ./build-uboot.sh && ./build-kernel-mainline.sh && ./build-kernel-bsp.sh && ./build-images.sh
70+
COPY entrypoint.sh /flipperone-linux-build-scripts/entrypoint.sh
71+
RUN chmod +x /flipperone-linux-build-scripts/entrypoint.sh
72+
ENTRYPOINT ["/bin/bash", "/flipperone-linux-build-scripts/entrypoint.sh"]
73+
CMD ["all"]

entrypoint.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Determine build target (default: all)
5+
BUILD_TARGET="${BUILD_TARGET:-all}"
6+
7+
cd /flipperone-linux-build-scripts
8+
9+
case "${BUILD_TARGET}" in
10+
all)
11+
./build-uboot.sh
12+
./build-kernel-mainline.sh
13+
./build-kernel-bsp.sh
14+
./build-images.sh
15+
;;
16+
uboot)
17+
./build-uboot.sh
18+
;;
19+
kernel-mainline)
20+
./build-kernel-mainline.sh
21+
;;
22+
kernel-bsp)
23+
./build-kernel-bsp.sh
24+
;;
25+
images)
26+
./build-images.sh
27+
;;
28+
*)
29+
echo "Unknown BUILD_TARGET: ${BUILD_TARGET}"
30+
echo "Valid targets: all, uboot, kernel-mainline, kernel-bsp, images"
31+
exit 1
32+
;;
33+
esac

0 commit comments

Comments
 (0)