mirror of
https://github.com/YuCat-OVO/BaiduNetdisk-Docker
synced 2025-05-10 20:10:04 +08:00
Prettier
This commit is contained in:
parent
4b77b8eefa
commit
cbee6ee7f3
28
Dockerfile
28
Dockerfile
@ -1,11 +1,11 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM docker.io/library/alpine:edge as download
|
||||
|
||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||
RUN \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add wget curl jq &&\
|
||||
wget -nv $(curl 'https://yun.baidu.com/disk/cmsdata?platform=linux&page=1&num=1' | jq -r '.["list"][0]["url_1"]') -O /tmp/baidunetdisk.deb
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' "/etc/apk/repositories" && \
|
||||
apk --no-cache add wget jq && \
|
||||
wget -nv "$(wget -nv -O - "https://yun.baidu.com/disk/cmsdata?platform=linux&page=1&num=1" | jq -r '.["list"][0]["url_1"]')" -O "/tmp/baidunetdisk.deb"
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-062d5346-ls56
|
||||
|
||||
@ -21,31 +21,29 @@ COPY --from=download /tmp/baidunetdisk.deb /tmp/baidunetdisk.deb
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
|
||||
RUN \
|
||||
sed -i "s/deb.debian.org/mirror.bfsu.edu.cn/g" /etc/apt/sources.list &&\
|
||||
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" /etc/apt/sources.list &&\
|
||||
sed -i "s/deb.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||
echo "**** fix trusted.gpg ****" && \
|
||||
mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/docker.gpg && \
|
||||
apt-get update -y && \
|
||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing \
|
||||
mv "/etc/apt/trusted.gpg" "/etc/apt/trusted.gpg.d/docker.gpg" && \
|
||||
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing \
|
||||
fonts-wqy-microhei \
|
||||
fonts-wqy-zenhei \
|
||||
desktop-file-utils && \
|
||||
\
|
||||
echo "**** install BaiduNetdisk ****" && \
|
||||
for i in \
|
||||
$(dpkg -I /tmp/baidunetdisk.deb | grep "Depends" | cut -c11- | awk -F ', ' '{ for(i=1; i<=NF; i++) print $i }'); \
|
||||
$(dpkg -I "/tmp/baidunetdisk.deb" | grep "Depends" | cut -c11- | awk -F ', ' '{ for(i=1; i<=NF; i++) print $i }'); \
|
||||
do \
|
||||
if [ -n "$(dpkg -l | grep ^ii | grep $i)" ]; \
|
||||
if dpkg -l | grep "^ii" | grep -q "$i"; \
|
||||
then \
|
||||
echo "${i} installed,skip"; \
|
||||
else \
|
||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing ${i}; \
|
||||
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing "${i}"; \
|
||||
fi \
|
||||
done && \
|
||||
dpkg -i /tmp/baidunetdisk.deb && \
|
||||
echo "**** add test ****" && \
|
||||
chmod +x /usr/bin/mytest && \
|
||||
dpkg -i "/tmp/baidunetdisk.deb" && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM docker.io/library/alpine:edge as download
|
||||
|
||||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||
RUN \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add wget curl jq &&\
|
||||
wget -nv $(curl 'https://yun.baidu.com/disk/cmsdata?platform=linux&page=1&num=1' | jq -r '.["list"][0]["url_1"]' | sed "s/amd64/arm64/g") -O /tmp/baidunetdisk.deb
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' "/etc/apk/repositories" && \
|
||||
apk --no-cache add wget jq && \
|
||||
wget -nv "$(wget -nv -O - 'https://yun.baidu.com/disk/cmsdata?platform=linux&page=1&num=1' | jq -r '.["list"][0]["url_1"]' | sed "s/amd64/arm64/g")" -O "/tmp/baidunetdisk.deb"
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-062d5346-ls56
|
||||
|
||||
@ -21,13 +21,13 @@ COPY --from=download /tmp/baidunetdisk.deb /tmp/baidunetdisk.deb
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
|
||||
RUN \
|
||||
sed -i "s/deb.debian.org/mirror.bfsu.edu.cn/g" /etc/apt/sources.list &&\
|
||||
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" /etc/apt/sources.list &&\
|
||||
sed -i "s/deb.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||
echo "**** fix trusted.gpg ****" && \
|
||||
mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/docker.gpg && \
|
||||
apt-get update -y && \
|
||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing \
|
||||
mv "/etc/apt/trusted.gpg" "/etc/apt/trusted.gpg.d/docker.gpg" && \
|
||||
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing \
|
||||
fonts-wqy-microhei \
|
||||
fonts-wqy-zenhei \
|
||||
desktop-file-utils && \
|
||||
@ -35,19 +35,16 @@ RUN \
|
||||
echo "**** install BaiduNetdisk ****" && \
|
||||
sed -i "s/baidunetdisk --no-sandbox/baidunetdisk --no-sandbox --disable-gpu-sandbox/g" /defaults/*; \
|
||||
for i in \
|
||||
$(dpkg -I /tmp/baidunetdisk.deb | grep "Depends" | cut -c11- | awk -F ', ' '{ for(i=1; i<=NF; i++) print $i }'); \
|
||||
$(dpkg -I "/tmp/baidunetdisk.deb" | grep "Depends" | cut -c11- | awk -F ', ' '{ for(i=1; i<=NF; i++) print $i }'); \
|
||||
do \
|
||||
if [ -n "$(dpkg -l | grep ^ii | grep $i)" ]; \
|
||||
if dpkg -l | grep "^ii" | grep -q "$i"; \
|
||||
then \
|
||||
echo "${i} installed,skip"; \
|
||||
else \
|
||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing ${i}; \
|
||||
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing "${i}"; \
|
||||
fi \
|
||||
done && \
|
||||
dpkg -i /tmp/baidunetdisk.deb && \
|
||||
echo "**** add test ****" && \
|
||||
chmod +x /usr/bin/mytest && \
|
||||
sed -i "s/baidunetdisk --no-sandbox/baidunetdisk --no-sandbox --disable-gpu-sandbox/g" root/usr/bin/mytest; \
|
||||
dpkg -i "/tmp/baidunetdisk.deb" && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user