File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
1417FROM arch AS golang-dev
1518
@@ -21,13 +24,13 @@ WORKDIR /build
2124COPY . .
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
3235ARG GIT_REVISION
3336ENV GIT_REVISION=${GIT_REVISION}
@@ -38,7 +41,10 @@ COPY ./modules /usr/share/alteriso/modules
3841COPY ./bootloaders /usr/share/alteriso/bootloaders
3942COPY ./setup_3rd_repo.sh /tmp/setup_3rd_repo.sh
4043RUN <<EOF
41- set -e
44+ set -eu
45+
46+ alteriso install-archiso
47+
4248chmod +x /usr/local/bin/alteriso /tmp/setup_3rd_repo.sh
4349bash /tmp/setup_3rd_repo.sh || exit 1
4450rm -rf /tmp/setup_3rd_repo.sh
You can’t perform that action at this time.
0 commit comments