Skip to content

Commit 425b872

Browse files
committed
refact: Dockerfile structure
1 parent 29182ee commit 425b872

2 files changed

Lines changed: 26 additions & 22 deletions

File tree

‎system/Dockerfile‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ COPY seccomp-default.json /etc/docker/
1111
RUN apt-get update && apt-get install --no-install-recommends -y \
1212
initramfs-tools \
1313
zstd \
14-
&& echo "btrfs" >>/etc/initramfs-tools/modules \
15-
&& echo "ahci" >>/etc/initramfs-tools/modules \
16-
&& echo "nvme" >>/etc/initramfs-tools/modules \
17-
&& echo "sd_mod" >>/etc/initramfs-tools/modules \
18-
&& echo "sdhci" >>/etc/initramfs-tools/modules \
19-
&& echo "sdhci_pci" >>/etc/initramfs-tools/modules \
20-
&& echo "usb_storage" >>/etc/initramfs-tools/modules \
21-
&& echo "mmc_block" >>/etc/initramfs-tools/modules \
22-
&& echo "mmc_core" >>/etc/initramfs-tools/modules \
23-
&& echo "sr_mod" >>/etc/initramfs-tools/modules \
24-
&& echo "microcode" >>/etc/initramfs-tools/modules \
14+
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
2515
&& echo "RESUME=none" >>/etc/initramfs-tools/conf.d/resume \
26-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
16+
&& cat >> "/etc/initramfs-tools/modules" <<'EOF'
17+
btrfs
18+
ahci
19+
nvme
20+
sd_mod
21+
sdhci
22+
sdhci_pci
23+
usb_storage
24+
mmc_block
25+
mmc_core
26+
sr_mod
27+
microcode
28+
EOF
2729

2830
# Install required packages
2931
RUN apt-get update && apt-get install --no-install-recommends -y \

‎system/Dockerfile.rpi-arm64‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/raspberrypi-archive.gpg] http://archi
4242
RUN apt-get update && apt-get install --no-install-recommends -y \
4343
initramfs-tools \
4444
zstd \
45-
&& echo "btrfs" >>/etc/initramfs-tools/modules \
46-
&& echo "nvme" >>/etc/initramfs-tools/modules \
47-
&& echo "sd_mod" >>/etc/initramfs-tools/modules \
48-
&& echo "sdhci" >>/etc/initramfs-tools/modules \
49-
&& echo "sdhci_pci" >>/etc/initramfs-tools/modules \
50-
&& echo "usb_storage" >>/etc/initramfs-tools/modules \
51-
&& echo "mmc_block" >>/etc/initramfs-tools/modules \
52-
&& echo "mmc_core" >>/etc/initramfs-tools/modules \
53-
&& echo "sr_mod" >>/etc/initramfs-tools/modules \
45+
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
5446
&& echo "RESUME=none" >>/etc/initramfs-tools/conf.d/resume \
55-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
47+
&& cat >> "/etc/initramfs-tools/modules" <<'EOF'
48+
btrfs
49+
nvme
50+
sd_mod
51+
sdhci
52+
sdhci_pci
53+
usb_storage
54+
mmc_block
55+
mmc_core
56+
sr_mod
57+
EOF
5658

5759
# Install required packages
5860
RUN apt-get update && apt-get install --no-install-recommends -y \

0 commit comments

Comments
 (0)