Giter VIP home page Giter VIP logo

oneclickvirt / pve_lxc_images Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 1.0 157 KB

PVE的LXC容器的第三方模板文件仓库--手动修复但自动化验证可用性(Third-party template file repository for LXC containers for PVE - manual fixes but automated verification of availability)

Home Page: https://github.com/spiritLHLS/pve

License: MIT License

Shell 100.00%
lxc proxmox proxmox-ve ssh x86 x86-64 patcher patcher-script images

pve_lxc_images's Introduction

pve_lxc_images

不支持:devuan

部分支持:fedora、gentoo、archlinux

完全支持:ubuntu、debian、centos、almalinux、rockylinux、alpine、opensuse

说明

已预安装:openssh、lsof、curl、wget、sudo、nano、sshpass

已替换可使用的源,均为可使用的源,且均已更新过源

已预设置开机自启SSH,预设置支持IPV4和IPV6的22端口进行SSH链接,预设置支持root登录

未设置默认密码,未设置DNS,未设置网关

部分旧镜像有对应的缺陷,详见仓库对应release的说明

手动修补的部分命令

image=""
pct create 101 "$image" -cores 1 -cpuunits 1024 -memory 1024 -swap 0 -rootfs local:10 -onboot 1 -features nesting=1
pct start 101
pct set 101 --hostname 101
pct set 101 --net0 name=spiritlhl,ip=172.16.1.2/24,bridge=vmbr1,gw=172.16.1.1
pct set 101 --nameserver 1.1.1.1
pct set 101 --searchdomain local
sleep 3
echo "nameserver 8.8.8.8" | pct exec $CTID -- tee -a /etc/resolv.conf
echo "nameserver 8.8.4.4" | pct exec $CTID -- tee -a /etc/resolv.conf
pct enter 101
# https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh
./ChangeMirrors.sh --use-official-source --web-protocol http --intranet false --close-firewall true --backup true --updata-software false --clean-cache false --ignore-backup-tips
# https://raw.githubusercontent.com/SuperManito/LinuxMirrors/main/ChangeMirrors.sh
./ChangeMirrors.sh --use-official-source --web-protocol http --intranet false --close-firewall true --backup true --updata-software false --clean-cache false --install-epel true --ignore-backup-tips

https://help.mirrors.cernet.edu.cn/

# https://raw.githubusercontent.com/oneclickvirt/pve_lxc_images/main/ssh_bash.sh
chmod 777 ssh_bash.sh
./ssh_bash.sh
# https://raw.githubusercontent.com/oneclickvirt/pve_lxc_images/main/ssh_sh.sh
chmod 777 ssh_sh.sh
./ssh_sh.sh
pct exec 101 -- yum clean all -y
pct exec 101 -- yum autoremove -y
pct exec 101 -- apt-get clean
pct exec 101 -- apt-get autoclean
pct exec 101 -- apt-get autoremove
pct exec 101 -- rm -rf /etc/resolv.conf
pct exec 101 -- rm -rf /etc/hostname
pct exec 101 -- rm -rf /etc/network/.pve-ignore.interfaces
pct exec 101 -- ip addr flush dev eth0
pct set 101 --delete net0
pct stop 101
echo "$image"
vzdump 101 --dumpdir /root/tp --compress zstd
rm -rf /root/tp/*.log
backup_file_name=$(ls /root/tp | grep "vzdump")
real_name=$(echo "${image}" | sed 's/_amd64\..*//')
mv /root/tp/${backup_file_name} /root/tp/${real_name}_amd64.tar.zst
rm -rf /root/tp/vzdump*
pct destroy 101

上传到对应release

# https://api.github.com/repos/oneclickvirt/pve_lxc_images/releases/tags/images
release_id="139874716"
token=""
for file in *; do
    if [ -f "$file" ]; then
        echo "Uploading $file..."
        curl -s -H "Authorization: Bearer $token" \
             -H "Content-Type: application/zip" \
             --data-binary @"$file" \
             "https://uploads.github.com/repos/oneclickvirt/pve_lxc_images/releases/$release_id/assets?name=$(basename "$file")"
        rm -rf $file
        echo ""
    fi
done

Thanks

http://download.proxmox.com/images/system/

https://github.com/spiritLHLS/pve

pve_lxc_images's People

Contributors

spiritlhls avatar

Stargazers

 avatar  avatar

Forkers

iii80

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.