mirror of
https://github.com/YuCat-OVO/BaiduNetdisk-Docker
synced 2025-05-10 20:10:04 +08:00
Initial commit
This commit is contained in:
parent
3a2c89ce43
commit
2f8de30ef8
55
Dockerfile
Normal file
55
Dockerfile
Normal file
@ -0,0 +1,55 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm
|
||||
|
||||
# set version label
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG BAIDUNETDISK_VERSION
|
||||
LABEL build_version="version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||
# LABEL maintainer=""
|
||||
|
||||
# https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.17.7/baidunetdisk_4.17.7_amd64.deb
|
||||
|
||||
ENV \
|
||||
CUSTOM_PORT="8080" \
|
||||
CUSTOM_HTTPS_PORT="8181" \
|
||||
HOME="/config" \
|
||||
TITLE="Baidunetdisk"
|
||||
|
||||
RUN \
|
||||
echo "**** add icon ****" && \
|
||||
curl -o \
|
||||
/kclient/public/icon.png \
|
||||
https://raw.githubusercontent.com/YuCat-OVO/BaiduNetdisk-Docker/master/docs/baidunetdisk.png && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
fonts-wqy-microhei \
|
||||
fonts-wqy-zenhei \
|
||||
libgtk-3-0 \
|
||||
libnotify4 \
|
||||
libatspi2.0-0 \
|
||||
libsecret-1-0 \
|
||||
desktop-file-utils && \
|
||||
echo "**** install BaiduNetdisk ****" && \
|
||||
if [ -z ${BAIDUNETDISK_VERSION+x} ]; then \
|
||||
BAIDUNETDISK_URL="https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.17.7/baidunetdisk_4.17.7_amd64.deb"; \
|
||||
else \
|
||||
BAIDUNETDISK_URL="https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/${BAIDUNETDISK_VERSION}/baidunetdisk_${BAIDUNETDISK_VERSION}_amd64.deb"; \
|
||||
fi && \
|
||||
echo "***** Getting $BAIDUNETDISK_URL ****" && \
|
||||
curl -o \
|
||||
/tmp/baidunetdisk.deb -L \
|
||||
"$BAIDUNETDISK_URL" && \
|
||||
dpkg -i /tmp/baidunetdisk.deb && \
|
||||
echo "**** cleanup ****" && \
|
||||
apt-get clean && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
64
docs/.github/workflows/Build.yml
vendored
Normal file
64
docs/.github/workflows/Build.yml
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- Dockerfile
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Set Version
|
||||
id: set-version
|
||||
run: |
|
||||
VERSION="1.0.0"
|
||||
BAIDUNETDISK_VERSION="4.17.7"
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "BAIDUNETDISK_VERSION=${BAIDUNETDISK_VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=${{ steps.set-version.outputs.VERSION }}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Buildx
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: |
|
||||
linux/amd64
|
||||
push: true
|
||||
build-args: |
|
||||
BUILD_DATE=${GITHUB_DATE}
|
||||
VERSION=${VERSION}
|
||||
BAIDUNETDISK_VERSION=${BAIDUNETDISK_VERSION}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
BIN
docs/baidunetdisk.png
Normal file
BIN
docs/baidunetdisk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
1
root/defaults/autostart
Normal file
1
root/defaults/autostart
Normal file
@ -0,0 +1 @@
|
||||
/opt/baidunetdisk/baidunetdisk --no-sandbox $CLI_ARGS
|
||||
7
root/defaults/menu.xml
Normal file
7
root/defaults/menu.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openbox_menu xmlns="http://openbox.org/3.4/menu">
|
||||
<menu id="root-menu" label="MENU">
|
||||
<item label="BaiduNetdisk GUI" icon="/opt/baidunetdisk/baidunetdisk.svg"><action name="Execute"><command>/opt/baidunetdisk/baidunetdisk --no-sandbox</command></action></item>
|
||||
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
|
||||
</menu>
|
||||
</openbox_menu>
|
||||
13
root/etc/s6-overlay/s6-rc.d/init-baidunetdisk-config/run
Normal file
13
root/etc/s6-overlay/s6-rc.d/init-baidunetdisk-config/run
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# default file copies first run
|
||||
if [[ ! -f /config/.config/openbox/menu.xml ]]; then
|
||||
mkdir -p /config/.config/openbox && \
|
||||
cp /defaults/menu.xml /config/.config/openbox/menu.xml && \
|
||||
lsiown -R abc:abc /config/.config
|
||||
fi
|
||||
|
||||
# permissions
|
||||
lsiown -R abc:abc \
|
||||
/config
|
||||
@ -0,0 +1 @@
|
||||
oneshot
|
||||
Loading…
Reference in New Issue
Block a user