-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.arm64
53 lines (47 loc) · 1.97 KB
/
Dockerfile.arm64
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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 --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
LABEL org.opencontainers.image.source="https://github.com/YuCat-OVO/BaiduNetdisk-Docker"
ENV \
CUSTOM_PORT="8080" \
CUSTOM_HTTPS_PORT="8181" \
HOME="/config" \
TITLE="Baidunetdisk"
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" &&\
echo "**** fix trusted.gpg ****" && \
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 ****" && \
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 }'); \
do \
if dpkg -l | grep "^ii" | grep -q "$i"; \
then \
echo "${i} installed,skip"; \
else \
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 "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*