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
|
# syntax=docker/dockerfile:1
|
||||||
FROM docker.io/library/alpine:edge as download
|
FROM docker.io/library/alpine:edge as download
|
||||||
|
|
||||||
|
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||||
RUN \
|
RUN \
|
||||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' /etc/apk/repositories && \
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' "/etc/apk/repositories" && \
|
||||||
apk update && \
|
apk --no-cache add wget jq && \
|
||||||
apk add wget curl 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"
|
||||||
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
|
|
||||||
|
|
||||||
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-062d5346-ls56
|
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
|
# add local files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
|
||||||
RUN \
|
RUN \
|
||||||
sed -i "s/deb.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 &&\
|
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||||
echo "**** fix trusted.gpg ****" && \
|
echo "**** fix trusted.gpg ****" && \
|
||||||
mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/docker.gpg && \
|
mv "/etc/apt/trusted.gpg" "/etc/apt/trusted.gpg.d/docker.gpg" && \
|
||||||
apt-get update -y && \
|
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing \
|
||||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing \
|
|
||||||
fonts-wqy-microhei \
|
fonts-wqy-microhei \
|
||||||
fonts-wqy-zenhei \
|
fonts-wqy-zenhei \
|
||||||
desktop-file-utils && \
|
desktop-file-utils && \
|
||||||
\
|
\
|
||||||
echo "**** install BaiduNetdisk ****" && \
|
echo "**** install BaiduNetdisk ****" && \
|
||||||
for i in \
|
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 \
|
do \
|
||||||
if [ -n "$(dpkg -l | grep ^ii | grep $i)" ]; \
|
if dpkg -l | grep "^ii" | grep -q "$i"; \
|
||||||
then \
|
then \
|
||||||
echo "${i} installed,skip"; \
|
echo "${i} installed,skip"; \
|
||||||
else \
|
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 \
|
fi \
|
||||||
done && \
|
done && \
|
||||||
dpkg -i /tmp/baidunetdisk.deb && \
|
dpkg -i "/tmp/baidunetdisk.deb" && \
|
||||||
echo "**** add test ****" && \
|
|
||||||
chmod +x /usr/bin/mytest && \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM docker.io/library/alpine:edge as download
|
FROM docker.io/library/alpine:edge as download
|
||||||
|
|
||||||
|
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
|
||||||
RUN \
|
RUN \
|
||||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' /etc/apk/repositories && \
|
sed -i 's/dl-cdn.alpinelinux.org/mirrors.lzu.edu.cn/g' "/etc/apk/repositories" && \
|
||||||
apk update && \
|
apk --no-cache add wget jq && \
|
||||||
apk add wget curl 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"
|
||||||
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
|
|
||||||
|
|
||||||
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-062d5346-ls56
|
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
|
# add local files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
|
||||||
RUN \
|
RUN \
|
||||||
sed -i "s/deb.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 &&\
|
sed -i "s/security.debian.org/mirror.bfsu.edu.cn/g" "/etc/apt/sources.list" &&\
|
||||||
echo "**** fix trusted.gpg ****" && \
|
echo "**** fix trusted.gpg ****" && \
|
||||||
mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/docker.gpg && \
|
mv "/etc/apt/trusted.gpg" "/etc/apt/trusted.gpg.d/docker.gpg" && \
|
||||||
apt-get update -y && \
|
apt-get update -y && apt-get install -y --no-install-recommends --no-install-suggests --fix-missing \
|
||||||
apt-get -yy -qq install --no-install-recommends --no-install-suggests --fix-missing \
|
|
||||||
fonts-wqy-microhei \
|
fonts-wqy-microhei \
|
||||||
fonts-wqy-zenhei \
|
fonts-wqy-zenhei \
|
||||||
desktop-file-utils && \
|
desktop-file-utils && \
|
||||||
@ -35,19 +35,16 @@ RUN \
|
|||||||
echo "**** install BaiduNetdisk ****" && \
|
echo "**** install BaiduNetdisk ****" && \
|
||||||
sed -i "s/baidunetdisk --no-sandbox/baidunetdisk --no-sandbox --disable-gpu-sandbox/g" /defaults/*; \
|
sed -i "s/baidunetdisk --no-sandbox/baidunetdisk --no-sandbox --disable-gpu-sandbox/g" /defaults/*; \
|
||||||
for i in \
|
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 \
|
do \
|
||||||
if [ -n "$(dpkg -l | grep ^ii | grep $i)" ]; \
|
if dpkg -l | grep "^ii" | grep -q "$i"; \
|
||||||
then \
|
then \
|
||||||
echo "${i} installed,skip"; \
|
echo "${i} installed,skip"; \
|
||||||
else \
|
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 \
|
fi \
|
||||||
done && \
|
done && \
|
||||||
dpkg -i /tmp/baidunetdisk.deb && \
|
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; \
|
|
||||||
echo "**** cleanup ****" && \
|
echo "**** cleanup ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user