Skip to content

Commit 5b1f0e1

Browse files
committed
feat: Install patched archiso from github
1 parent 6ed9542 commit 5b1f0e1

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

alteriso/Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ RUN pacman -Syu --noconfirm && \
55
pacman -Scc --noconfirm
66

77

8-
FROM arch AS archiso
8+
FROM arch AS archiso-deps
99

1010
# Install archiso
11-
RUN pacman -S --noconfirm archiso jq unzip && \
12-
pacman -Scc --noconfirm
11+
RUN <<EOS
12+
set -eu
13+
pacman -Sy --noconfirm jq unzip
14+
pacman -Scc --noconfirm
15+
EOS
1316

1417
FROM arch AS golang-dev
1518

@@ -21,13 +24,13 @@ WORKDIR /build
2124
COPY . .
2225

2326
# Build the binary with optimization flags
24-
RUN CGO_ENABLED=0 GOOS=linux go build \
27+
RUN CGO_ENABLED=1 GOOS=linux go build \
2528
-ldflags="-s -w" \
2629
-trimpath \
2730
-o alteriso ./src
2831

2932
# Final stage
30-
FROM archiso AS alteriso
33+
FROM archiso-deps AS alteriso
3134

3235
ARG GIT_REVISION
3336
ENV GIT_REVISION=${GIT_REVISION}
@@ -38,7 +41,10 @@ COPY ./modules /usr/share/alteriso/modules
3841
COPY ./bootloaders /usr/share/alteriso/bootloaders
3942
COPY ./setup_3rd_repo.sh /tmp/setup_3rd_repo.sh
4043
RUN <<EOF
41-
set -e
44+
set -eu
45+
46+
alteriso install-archiso
47+
4248
chmod +x /usr/local/bin/alteriso /tmp/setup_3rd_repo.sh
4349
bash /tmp/setup_3rd_repo.sh || exit 1
4450
rm -rf /tmp/setup_3rd_repo.sh

0 commit comments

Comments
 (0)