-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (24 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM ubuntu:22.04
WORKDIR /app
RUN apt update
RUN apt upgrade -y
RUN apt install curl -y
RUN apt install zsh -y
# download iventoy realse and extract it
SHELL ["/bin/zsh", "-c"]
RUN Version=$(curl -L --stderr - --location --remote-header-name https://github.com/ventoy/PXE/releases/latest | grep -o -E '"/ventoy/PXE/releases/tag/[^"]+"') && \
Replace="/ventoy/PXE/releases/tag/" && \
Version=$(echo "$Version" | sed "s|$Replace||g") && \
Version="${Version%%$'\n'*}" && \
Version="${Version%% *}" && \
Version=$(echo "$Version" | sed "s|"v"||g") && \
Version=$(echo "$Version" | sed 's|"||g') && \
echo $Version && \
DownloadLink="https://github.com/ventoy/PXE/releases/latest/download/iventoy-"$Version"-linux-free.tar.gz" && \
echo $DownloadLink && \
curl --output iventoy.tar.gz --location --remote-header-name "https://github.com/ventoy/PXE/releases/latest/download/iventoy-"$Version"-linux-free.tar.gz" && \
tar -xvf iventoy.tar.gz && \
rm -rf iventoy.tar.gz && \
cp -R -v ./iventoy-$Version/* /app && \
rm -rf ./iventoy-$Version/
CMD ["/bin/bash", "-c", "cd /app && bash iventoy.sh start && sleep infinity"]