更新文档

This commit is contained in:
Super Manito
2025-10-05 10:01:15 +08:00
parent 55b22bf72b
commit 8e88ae4fbb
15 changed files with 776 additions and 615 deletions

View File

@@ -0,0 +1,23 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:serif="http://www.serif.com/" width="100%" height="100%" viewBox="0 0 231 32" version="1.1" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2">
<g transform="matrix(0.0548465,0,0,0.0548465,0,0)">
<path d="M661.56,218.08C645.07,206.98 601.75,202.24 570.26,210.73C568.57,179.36 552.38,152.92 522.79,129.85L511.84,122.5L504.54,133.53C490.19,155.31 484.14,184.34 486.28,210.73C487.97,226.99 493.62,245.26 504.54,258.52C463.55,282.3 425.76,276.9 258.42,276.9L0.06,276.9C-0.69,314.69 5.38,387.37 51.6,446.54C56.71,453.08 62.3,459.4 68.38,465.49C105.96,503.12 162.74,530.72 247.64,530.79C377.17,530.91 488.14,460.89 555.65,291.61C577.86,291.97 636.5,295.59 665.2,240.14C665.9,239.21 672.5,225.44 672.5,225.44L661.56,218.09L661.56,218.08ZM168.67,183.53L96.02,183.53L96.02,256.18L168.67,256.18L168.67,183.53ZM262.52,183.53L189.87,183.53L189.87,256.18L262.52,256.18L262.52,183.53ZM356.38,183.53L283.73,183.53L283.73,256.18L356.38,256.18L356.38,183.53ZM450.24,183.53L377.59,183.53L377.59,256.18L450.24,256.18L450.24,183.53ZM74.81,183.53L2.16,183.53L2.16,256.18L74.81,256.18L74.81,183.53ZM168.67,91.77L96.02,91.77L96.02,164.42L168.67,164.42L168.67,91.77ZM262.52,91.77L189.87,91.77L189.87,164.42L262.52,164.42L262.52,91.77ZM356.38,91.77L283.73,91.77L283.73,164.42L356.38,164.42L356.38,91.77ZM356.38,0L283.73,0L283.73,72.65L356.38,72.65L356.38,0Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<g>
<path d="M2329.44,419.3C2329.44,438.24 2314.57,453.11 2295.23,453.11C2275.89,453.11 2260.81,438.24 2260.81,419.3C2260.81,400.36 2276.08,385.9 2295.23,385.9C2314.38,385.9 2329.44,400.77 2329.44,419.3ZM2269.37,419.3C2269.37,434.17 2280.37,445.98 2295.44,445.98C2310.51,445.98 2320.9,434.17 2320.9,419.51C2320.9,404.85 2310.1,392.62 2295.25,392.62C2280.4,392.62 2269.38,404.64 2269.38,419.3L2269.37,419.3ZM2289.95,436.82L2282.21,436.82L2282.21,403.42C2285.25,402.81 2289.54,402.4 2295.03,402.4C2301.35,402.4 2304.19,403.42 2306.64,404.85C2308.48,406.27 2309.9,408.92 2309.9,412.18C2309.9,415.85 2307.05,418.7 2302.99,419.92L2302.99,420.33C2306.23,421.54 2308.07,423.99 2309.09,428.47C2310.1,433.56 2310.71,435.6 2311.54,436.82L2303.19,436.82C2302.17,435.6 2301.55,432.55 2300.54,428.67C2299.93,425.01 2297.89,423.38 2293.61,423.38L2289.95,423.38L2289.95,436.83L2289.95,436.82ZM2290.14,417.88L2293.8,417.88C2298.08,417.88 2301.54,416.46 2301.54,413C2301.54,409.94 2299.31,407.89 2294.41,407.89C2292.38,407.89 2290.95,408.1 2290.14,408.32L2290.14,417.88Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M1017.16,81.28C1012.37,76.6 1006.62,74.22 999.73,74.22C992.84,74.22 986.92,76.6 982.31,81.28C977.69,85.96 975.43,91.96 975.43,99.11L975.43,218.51C951.73,198.92 924.38,189.04 893.27,189.04C857.11,189.04 826.19,202.1 800.57,228.31C774.95,254.43 762.23,286.03 762.23,323.09C762.23,360.15 775.04,391.66 800.57,417.87C826.19,443.99 857.03,457.14 893.27,457.14C929.51,457.14 960.01,444.08 985.97,417.87C1011.59,392.01 1024.31,360.42 1024.31,323.09L1024.31,99.11C1024.31,91.96 1021.96,85.96 1017.16,81.28ZM968.98,355.39L968.98,355.57C964.71,365.72 958.87,374.63 951.47,382.22C944.07,389.9 935.35,395.9 925.42,400.4C915.4,404.9 904.77,407.11 893.36,407.11C881.95,407.11 871.06,404.9 861.04,400.4C851.02,395.9 842.39,389.9 835.08,382.31C827.76,374.72 821.93,365.81 817.66,355.66C813.39,345.42 811.21,334.57 811.21,323.09C811.21,311.61 813.39,300.76 817.66,290.52C821.93,280.28 827.77,271.46 835.08,263.87C842.4,256.28 851.11,250.28 861.04,245.78C871.06,241.28 881.78,239.07 893.36,239.07C904.94,239.07 915.4,241.28 925.42,245.78C935.44,250.28 944.07,256.28 951.47,263.96C958.87,271.64 964.71,280.55 968.98,290.61C973.25,300.76 975.43,311.53 975.43,323C975.43,334.47 973.25,345.33 968.98,355.39Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M2099.77,271.64C2093.41,255.75 2083.72,241.37 2071.01,228.48L2070.84,228.39C2044.96,202.27 2014.02,189.12 1978.14,189.12C1942.26,189.12 1911.05,202.18 1885.43,228.39C1859.81,254.51 1847.1,286.11 1847.1,323.17C1847.1,360.23 1859.91,391.74 1885.43,417.95C1911.05,444.07 1941.9,457.22 1978.14,457.22C2011.06,457.22 2039.55,446.37 2063.78,424.66C2068.47,419.72 2070.84,413.72 2070.84,406.74C2070.84,399.76 2068.58,393.59 2063.95,388.91C2059.34,384.23 2053.5,381.85 2046.53,381.85C2040.44,382.03 2035.03,384.06 2030.42,388.12C2023.1,394.47 2015.17,399.33 2006.55,402.51C1997.92,405.69 1988.51,407.28 1978.24,407.28C1969.17,407.28 1960.46,405.87 1952.19,402.96C1943.9,400.05 1936.16,396.07 1929.27,390.87C1922.29,385.66 1916.29,379.49 1911.15,372.16C1906.01,364.92 1902.09,356.89 1899.48,348.07L2084.8,348.07C2091.67,348.07 2097.42,345.69 2102.22,341.01C2107.02,336.33 2109.37,330.33 2109.37,323.18C2109.37,304.65 2106.13,287.44 2099.79,271.64L2099.77,271.64ZM1899.29,298.29C1901.82,289.55 1905.65,281.52 1910.79,274.2C1915.94,266.96 1922.03,260.7 1929,255.49C1936.06,250.28 1943.72,246.31 1952.17,243.4C1960.61,240.49 1969.23,239.08 1978.14,239.08C1987.05,239.08 1995.65,240.49 2004,243.4C2012.37,246.31 2020.05,250.28 2026.92,255.49C2033.9,260.7 2039.99,266.87 2045.13,274.2C2050.35,281.44 2054.29,289.47 2056.99,298.29L1899.28,298.29L1899.29,298.29Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M2327.51,205.89C2323.15,201.57 2317.66,198.21 2311.04,195.74C2304.42,193.27 2297.19,191.59 2289.26,190.62C2281.42,189.65 2274.01,189.21 2267.14,189.21C2251.53,189.21 2236.9,191.77 2223.14,196.89C2209.37,202.01 2196.65,209.33 2184.97,218.86L2184.97,214.1C2184.97,207.22 2182.62,201.39 2177.82,196.54C2173.04,191.69 2167.37,189.22 2160.67,189.22C2153.97,189.22 2148.03,191.69 2143.25,196.54C2138.45,201.39 2136.1,207.31 2136.1,214.1L2136.1,432.35C2136.1,439.23 2138.45,445.06 2143.25,449.91C2148.03,454.76 2153.78,457.23 2160.67,457.23C2167.56,457.23 2173.12,454.76 2177.82,449.91C2182.62,445.06 2184.97,439.14 2184.97,432.35L2184.97,323.18C2184.97,311.53 2187.15,300.59 2191.42,290.35C2195.69,280.11 2201.53,271.29 2208.93,263.7C2216.35,256.11 2225.06,250.11 2234.98,245.78C2245,241.37 2255.64,239.16 2267.06,239.16C2278.48,239.16 2289.26,241.19 2299.12,245.16C2303.03,246.93 2306.44,247.81 2309.4,247.81C2312.8,247.81 2316.02,247.19 2318.98,245.87C2321.94,244.55 2324.56,242.78 2326.74,240.49C2328.92,238.2 2330.65,235.55 2331.96,232.46C2333.27,229.46 2333.97,226.19 2333.97,222.66C2333.97,215.78 2331.79,210.22 2327.44,205.89L2327.52,205.89L2327.51,205.89Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M1304.49,271.73C1298.13,255.93 1288.63,241.46 1275.83,228.4C1249.96,202.28 1219.03,189.13 1183.13,189.13C1147.23,189.13 1116.05,202.19 1090.43,228.4C1064.81,254.52 1052.1,286.12 1052.1,323.18C1052.1,360.24 1064.91,391.75 1090.43,417.96C1116.05,444.08 1146.89,457.23 1183.13,457.23C1219.37,457.23 1249.87,444.17 1275.83,417.96C1301.45,392.1 1314.17,360.51 1314.17,323.18C1313.99,304.65 1310.77,287.53 1304.5,271.73L1304.49,271.73ZM1258.84,355.39L1258.84,355.57C1254.57,365.72 1248.73,374.63 1241.33,382.22C1233.93,389.9 1225.21,395.9 1215.28,400.4C1205.35,404.9 1194.63,407.11 1183.22,407.11C1171.81,407.11 1160.92,404.9 1150.9,400.4C1140.88,395.9 1132.25,389.9 1124.94,382.31C1117.62,374.72 1111.79,365.81 1107.52,355.66C1103.25,345.42 1101.07,334.57 1101.07,323.09C1101.07,311.61 1103.25,300.76 1107.52,290.52C1111.79,280.28 1117.63,271.46 1124.94,263.87C1132.26,256.28 1140.97,250.28 1150.9,245.78C1160.92,241.28 1171.64,239.07 1183.22,239.07C1194.8,239.07 1205.26,241.28 1215.28,245.78C1225.3,250.28 1233.93,256.28 1241.33,263.96C1248.73,271.64 1254.57,280.55 1258.84,290.61C1263.11,300.76 1265.29,311.53 1265.29,323C1265.29,334.47 1263.11,345.33 1258.84,355.39Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M1828.62,214.01C1828.62,210.66 1827.92,207.48 1826.62,204.48C1825.31,201.48 1823.57,198.75 1821.39,196.45C1819.21,194.16 1816.6,192.3 1813.64,191.07C1810.68,189.84 1807.46,189.13 1804.06,189.13C1799.18,189.13 1794.82,190.37 1790.99,192.93L1651.07,286.04L1651.07,99.29C1651.07,92.23 1648.72,86.32 1643.93,81.46C1639.14,76.61 1633.48,74.14 1626.77,74.14C1620.06,74.14 1614.14,76.61 1609.34,81.46C1604.55,86.31 1602.2,92.23 1602.2,99.29L1602.2,432C1602.2,438.88 1604.55,444.8 1609.34,449.74C1614.13,454.68 1619.88,457.15 1626.77,457.15C1633.66,457.15 1639.23,454.68 1643.93,449.74C1648.72,444.8 1651.07,438.88 1651.07,432L1651.07,345.6L1679.65,326.45L1787.77,450.62C1792.13,454.94 1797.62,457.06 1804.15,457.06C1807.55,457.06 1810.77,456.44 1813.73,455.12C1816.69,453.88 1819.31,452.03 1821.48,449.74C1823.66,447.45 1825.4,444.8 1826.71,441.71C1828.02,438.71 1828.71,435.44 1828.71,432.18C1828.71,425.65 1826.45,419.82 1821.91,414.71L1721.28,298.84L1819.29,233.71C1825.56,229.39 1828.61,222.77 1828.61,213.85L1828.61,214.03L1828.62,214.01Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M1414.36,263.7C1421.85,256.11 1430.57,250.11 1440.59,245.78C1450.61,241.37 1461.24,239.16 1472.65,239.16C1482.93,239.16 1492.43,240.93 1501.23,244.45C1509.94,247.98 1518.31,253.19 1526.23,259.98C1530.93,263.77 1536.25,265.71 1542.17,265.71C1549.23,265.71 1554.98,263.33 1559.6,258.56C1564.22,253.79 1566.48,247.79 1566.48,240.64C1566.48,233.49 1563.69,226.87 1558.03,221.76C1533.98,200.05 1505.5,189.19 1472.65,189.19C1436.49,189.19 1405.57,202.25 1379.95,228.46C1354.33,254.58 1341.62,286.18 1341.62,323.24C1341.62,360.3 1354.43,391.81 1379.95,418.02C1405.57,444.14 1436.41,457.29 1472.65,457.29C1505.41,457.29 1533.9,446.44 1558.03,424.72C1563.17,419.43 1565.79,413.34 1565.79,406.28C1565.79,399.22 1563.52,393.13 1558.91,388.45C1554.29,383.77 1548.46,381.39 1541.49,381.39C1535.57,381.57 1530.42,383.33 1526.07,386.68C1518.23,393.56 1510.04,398.68 1501.24,402.12C1492.53,405.56 1483.03,407.24 1472.66,407.24C1461.25,407.24 1450.62,405.03 1440.6,400.62C1430.58,396.21 1421.87,390.21 1414.37,382.71C1406.88,375.21 1400.95,366.21 1396.68,356.06C1392.41,345.82 1390.23,334.88 1390.23,323.23C1390.23,311.58 1392.41,300.64 1396.68,290.4C1400.95,280.16 1406.87,271.34 1414.37,263.75L1414.37,263.66L1414.36,263.7Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
</g>
</g>
<g transform="matrix(0.0548465,0,0,0.0548465,0,0)">
<path d="M2647.06,84.09C2641.33,84.09 2636.47,85.93 2632.49,89.58C2628.5,93.24 2626.52,98.26 2626.52,104.62L2626.52,241.21C2616.01,226.88 2602.4,215.34 2585.69,206.58C2568.97,197.83 2550.27,193.45 2529.57,193.45C2505.37,193.45 2483.72,199.26 2464.62,210.88C2445.52,222.51 2430.39,238.34 2419.25,258.4C2408.1,278.46 2402.53,301.07 2402.53,326.22C2402.53,351.37 2408.34,374.46 2419.96,394.52C2431.58,414.58 2447.42,430.42 2467.48,442.04C2487.54,453.67 2510.14,459.47 2535.3,459.47C2560.46,459.47 2582.42,453.66 2602.16,442.04C2621.9,430.42 2637.58,414.66 2649.2,394.76C2660.82,374.87 2666.95,352.49 2667.59,327.66L2667.59,104.63C2667.59,98.26 2665.68,93.25 2661.86,89.59C2658.04,85.93 2653.1,84.1 2647.05,84.1L2647.06,84.09ZM2615.78,375.67C2607.66,390.16 2596.68,401.7 2582.82,410.3C2568.96,418.9 2553.13,423.2 2535.3,423.2C2517.47,423.2 2501.94,418.9 2487.78,410.3C2473.61,401.7 2462.38,390.17 2454.11,375.67C2445.83,361.18 2441.69,344.71 2441.69,326.24C2441.69,307.77 2445.82,291.7 2454.11,277.05C2462.39,262.41 2473.61,250.86 2487.78,242.42C2501.94,233.99 2517.79,229.76 2535.3,229.76C2552.81,229.76 2568.97,233.98 2582.82,242.42C2596.67,250.86 2607.66,262.4 2615.78,277.05C2623.9,291.7 2627.96,308.09 2627.96,326.24C2627.96,344.39 2623.9,361.19 2615.78,375.67Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M2903.29,209.94C2885.3,198.96 2864.2,193.46 2840.01,193.46C2815.82,193.46 2793.28,199.19 2774.34,210.65C2755.39,222.11 2740.51,237.8 2729.68,257.69C2718.85,277.59 2713.44,300.6 2713.44,326.7C2713.44,352.8 2719.17,375.41 2730.63,395.47C2742.09,415.53 2757.85,431.22 2777.91,442.51C2797.97,453.82 2821.05,459.46 2847.16,459.46C2861.8,459.46 2877.25,456.59 2893.49,450.86C2909.73,445.13 2923.1,437.81 2933.61,428.89C2938.07,425.39 2940.21,421.25 2940.06,416.47C2939.9,411.69 2937.43,407.24 2932.66,403.1C2929.47,400.23 2925.41,398.88 2920.48,399.04C2915.54,399.2 2911.17,400.71 2907.35,403.58C2900.66,409.31 2891.66,414.09 2880.36,417.91C2869.05,421.73 2857.99,423.64 2847.17,423.64C2828.38,423.64 2811.75,419.51 2797.26,411.22C2782.77,402.94 2771.39,391.48 2763.11,376.83C2756.85,365.76 2752.96,353.5 2751.43,340.05L2940.77,340.05C2946.18,340.05 2950.64,338.38 2954.14,335.04C2957.64,331.7 2959.39,327.32 2959.39,321.91C2959.39,297.08 2954.53,274.95 2944.82,255.52C2935.1,236.1 2921.25,220.89 2903.27,209.91L2903.29,209.94ZM2792.49,241.7C2806.02,233.42 2821.86,229.28 2840.01,229.28C2857.2,229.28 2872.01,233.26 2884.43,241.22C2896.85,249.18 2906.4,260.17 2913.09,274.17C2917.9,284.25 2920.88,295.24 2922.07,307.12L2752.12,307.12C2753.77,296.04 2756.88,285.77 2761.46,276.32C2768.62,261.51 2778.97,249.98 2792.5,241.69L2792.49,241.7Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M3151.64,324.09C3137.79,316.61 3118.92,310.8 3095.04,306.66C3077.53,303.48 3064.07,299.9 3054.68,295.91C3045.28,291.93 3038.76,287.4 3035.1,282.3C3031.44,277.21 3029.61,271.16 3029.61,264.15C3029.61,253.96 3034.7,245.61 3044.89,239.08C3055.08,232.56 3068.45,229.29 3085.01,229.29C3098.06,229.29 3109.68,231.28 3119.87,235.26C3130.06,239.24 3139.13,245.53 3147.09,254.13C3150.91,258.27 3155.6,260.82 3161.18,261.77C3166.75,262.73 3171.61,261.77 3175.75,258.9C3180.53,256.03 3183.15,252.14 3183.63,247.2C3184.11,242.27 3182.59,237.57 3179.09,233.11C3169.54,221.01 3156.96,211.38 3141.36,204.21C3125.76,197.05 3107.29,193.46 3085.96,193.46C3069.08,193.46 3053.4,196.17 3038.92,201.58C3024.43,207 3012.73,215.12 3003.82,225.94C2994.9,236.77 2990.45,250.3 2990.45,266.54C2990.45,284.37 2997.85,299.66 3012.66,312.39C3027.46,325.13 3050.94,334.2 3083.11,339.61C3107.95,343.75 3125.53,349.48 3135.89,356.8C3146.23,364.13 3151.41,373.2 3151.41,384.02C3151.09,395.17 3145.75,404.48 3135.41,411.96C3125.06,419.44 3108.9,423.18 3086.93,423.18C3071.96,423.18 3058.27,420.72 3045.86,415.78C3033.44,410.85 3023.73,404.24 3016.73,395.96C3013.22,392.14 3008.85,389.92 3003.6,389.27C2998.35,388.64 2993.17,390.23 2988.08,394.05C2983.62,397.56 2981.07,402.01 2980.44,407.42C2979.8,412.84 2981.4,417.61 2985.22,421.75C2996.36,433.85 3011.25,443.17 3029.88,449.69C3048.51,456.22 3067.68,459.48 3087.43,459.48C3108.44,459.48 3126.59,456.14 3141.88,449.45C3157.17,442.76 3169.02,433.77 3177.46,422.47C3185.89,411.17 3190.12,398.04 3190.12,383.07C3190.12,370.97 3187.17,359.99 3181.28,350.12C3175.38,340.25 3165.52,331.58 3151.67,324.09L3151.64,324.09Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M3326.87,308.66L3419.81,224.98C3423.94,221.16 3426.18,216.94 3426.5,212.32C3426.81,207.71 3425.07,203.33 3421.25,199.19C3417.43,195.06 3413.21,192.82 3408.59,192.5C3403.97,192.19 3399.59,193.93 3395.46,197.75L3266.51,314.24L3266.51,103.67C3266.51,97.94 3264.67,93.25 3261.02,89.58C3257.36,85.92 3252.5,84.09 3246.45,84.09C3240.72,84.09 3236.02,85.93 3232.36,89.58C3228.7,93.24 3226.87,97.94 3226.87,103.67L3226.87,437.51C3226.87,443.24 3228.7,447.94 3232.36,451.6C3236.02,455.26 3240.72,457.09 3246.45,457.09C3252.49,457.09 3257.35,455.26 3261.02,451.6C3264.68,447.94 3266.51,443.24 3266.51,437.51L3266.51,363L3298.51,334.19L3394.51,452.31C3398.01,456.77 3402.23,459.24 3407.17,459.71C3412.1,460.19 3416.8,458.52 3421.26,454.7C3426.04,450.88 3428.58,446.58 3428.9,441.8C3429.21,437.02 3427.62,432.57 3424.12,428.43L3326.88,308.65L3326.87,308.66Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M3587.45,416.98L3573.12,416.98C3559.75,416.98 3548.68,412.05 3539.93,402.17C3531.17,392.3 3526.8,379.89 3526.8,364.92L3526.8,240.27L3576.47,240.27C3581.88,240.27 3586.34,238.6 3589.84,235.26C3593.34,231.92 3595.09,227.86 3595.09,223.08C3595.09,217.99 3593.34,213.77 3589.84,210.42C3586.33,207.08 3581.88,205.4 3576.47,205.4L3526.8,205.4L3526.8,132.8C3526.8,127.07 3524.89,122.29 3521.07,118.47C3517.25,114.65 3512.47,112.74 3506.74,112.74C3500.69,112.74 3495.83,114.65 3492.17,118.47C3488.51,122.29 3486.68,127.07 3486.68,132.8L3486.68,205.4L3458.5,205.4C3453.08,205.4 3448.63,207.07 3445.13,210.42C3441.62,213.76 3439.88,217.99 3439.88,223.08C3439.88,227.86 3441.63,231.92 3445.13,235.26C3448.63,238.6 3453.09,240.27 3458.5,240.27L3486.68,240.27L3486.68,364.92C3486.68,382.43 3490.42,398.2 3497.9,412.2C3505.38,426.21 3515.65,437.2 3528.71,445.15C3541.76,453.11 3556.57,457.09 3573.13,457.09L3582.68,457.09C3589.37,457.09 3594.86,455.26 3599.16,451.6C3603.46,447.94 3605.61,443.09 3605.61,437.03C3605.61,431.3 3603.86,426.52 3600.36,422.7C3596.85,418.88 3592.55,416.97 3587.46,416.97L3587.45,416.98Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M3825.77,210.66C3806.02,199.2 3783.42,193.47 3757.95,193.47C3732.48,193.47 3709.31,199.2 3689.41,210.66C3669.51,222.12 3653.83,237.88 3642.37,257.94C3630.91,278 3625.18,300.92 3625.18,326.71C3625.18,352.5 3630.91,374.95 3642.37,395.01C3653.83,415.07 3669.51,430.83 3689.41,442.29C3709.3,453.75 3732.16,459.48 3757.95,459.48C3783.74,459.48 3806.11,453.75 3826.01,442.29C3845.91,430.83 3861.59,415.07 3873.05,395.01C3884.51,374.95 3890.24,352.19 3890.24,326.71C3889.92,300.92 3884.03,277.99 3872.57,257.94C3861.11,237.88 3845.5,222.12 3825.76,210.66L3825.77,210.66ZM3838.66,376.15C3830.7,390.64 3819.71,402.1 3805.71,410.54C3791.7,418.98 3775.78,423.2 3757.95,423.2C3740.12,423.2 3724.12,418.98 3709.95,410.54C3695.78,402.11 3684.64,390.65 3676.52,376.15C3668.4,361.66 3664.34,345.19 3664.34,326.72C3664.34,308.25 3668.4,291.7 3676.52,277.05C3684.64,262.41 3695.78,250.86 3709.95,242.42C3724.11,233.99 3740.11,229.76 3757.95,229.76C3775.79,229.76 3791.7,233.98 3805.71,242.42C3819.72,250.86 3830.7,262.4 3838.66,277.05C3846.62,291.7 3850.6,308.26 3850.6,326.72C3850.6,345.18 3846.61,361.67 3838.66,376.15Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
<path d="M4182.77,258.42C4171.14,238.36 4155.38,222.52 4135.49,210.9C4115.59,199.28 4092.9,193.47 4067.43,193.47C4041.96,193.47 4020.3,199.28 4000.57,210.9C3980.82,222.53 3965.15,238.29 3953.53,258.18C3941.9,278.08 3935.93,300.45 3935.62,325.28L3935.62,548.32C3935.62,554.69 3937.45,559.7 3941.11,563.36C3944.77,567.02 3949.78,568.85 3956.15,568.85C3961.88,568.85 3966.66,567.01 3970.48,563.36C3974.3,559.7 3976.21,554.68 3976.21,548.32L3976.21,411.73C3986.72,426.06 4000.4,437.6 4017.28,446.36C4034.15,455.12 4052.94,459.49 4073.64,459.49C4097.83,459.49 4119.49,453.68 4138.59,442.06C4157.69,430.44 4172.74,414.6 4183.72,394.54C4194.71,374.48 4200.2,351.88 4200.2,326.72C4200.2,301.56 4194.39,278.48 4182.77,258.42ZM4148.86,375.91C4140.74,390.56 4129.59,402.1 4115.43,410.54C4101.26,418.98 4085.26,423.2 4067.43,423.2C4049.6,423.2 4034.15,418.98 4020.15,410.54C4006.14,402.11 3995.15,390.56 3987.2,375.91C3979.24,361.27 3975.26,344.87 3975.26,326.72C3975.26,308.57 3979.24,291.78 3987.2,277.29C3995.15,262.8 4006.22,251.26 4020.39,242.66C4034.55,234.06 4050.24,229.76 4067.43,229.76C4084.62,229.76 4101.26,234.06 4115.43,242.66C4129.59,251.26 4140.74,262.8 4148.86,277.29C4156.98,291.78 4161.04,308.26 4161.04,326.72C4161.04,345.18 4156.98,361.27 4148.86,375.91Z" style="fill:rgb(29,99,237);fill-rule:nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" t="1745914066595" class="icon" viewBox="0 0 1024 1024" version="1.1" p-id="3365" width="200" height="200"><path d="M660.48 212.352c5.952-3.392 12.352-6.912 19.2-10.88l2.368 12.032c1.28 6.272 2.368 11.456 2.88 16.512 4.032 44.288 26.304 76.928 57.856 84.224 46.144 10.752 89.664-7.04 113.088-46.08 28.16-46.848 16-104.32-32-138.88C690.56 33.216 544.128 6.72 386.304 53.056 46.144 153.344-70.272 571.264 171.2 827.52c103.296 109.632 234.432 156.928 383.36 153.344 190.72-4.48 328-99.52 415.744-264.256 62.08-116.864-5.44-244.608-134.848-271.168a837.376 837.376 0 0 0-224.768-14.4c-24.96 2.432-49.28 9.792-71.424 21.76-24.768 12.8-31.872 39.488-29.12 65.92 2.56 24.064 21.056 38.528 43.008 42.176 44.288 6.912 89.088 10.88 133.76 14.592 12.928 1.088 25.984 1.28 39.04 1.344 18.752 0.192 37.376 0.384 55.68 3.392 52.032 8.576 69.888 50.816 43.136 96-6.592 10.88-14.208 21.056-22.848 30.336a259.392 259.392 0 0 1-131.392 77.76c-92.416 22.592-184.896 23.872-276.8-5.12-104.704-33.088-167.168-109.952-169.344-213.504-0.832-63.872 15.36-126.72 46.976-182.272 14.272-25.856 22.08-52.48 19.84-81.856-0.896-12.48-1.408-24.96-1.92-38.4l-1.024-22.4c10.624 2.176 21.12 4.992 31.36 8.32 40.064 16.128 79.488 23.488 122.88 11.648A222.08 222.08 0 0 1 517.76 256a188.608 188.608 0 0 0 115.648-28.288c8.64-5.056 17.344-9.92 26.944-15.36z" fill="currentColor" p-id="3366"/></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,14 +1,20 @@
``` bash ``` bash
# !/bin/bash # !/bin/bash
function install_docker() { function install_docker() {
local region_code="$(curl -s ipinfo.io/country)" if command -v docker &>/dev/null; then
local close_firewall="true" # close firewalld service and selinux (redhat systems need) return
fi
# script options
local script_host="linuxmirrors.cn" # official host (CDN), more host see official site
local close_firewall="true" # close firewalld service and selinux (redhat systems need)
# mirrors options
local source_docker_ce_address="mirrors.tencent.com/docker-ce" # global high availability address local source_docker_ce_address="mirrors.tencent.com/docker-ce" # global high availability address
local source_docker_ce_protocol="https" local source_docker_ce_protocol="https" # https or http
local source_docker_registry_address="" local source_docker_registry_address="registry.hub.docker.com"
# judge network environment # judge network environment
local region_code="$(curl -s ipinfo.io/country)"
if [[ "${region_code}" == "CN" ]]; then if [[ "${region_code}" == "CN" ]]; then
local source_intranet_address="" local source_intranet_address=""
# use intranet source if possible # use intranet source if possible
@@ -36,14 +42,16 @@ function install_docker() {
source_docker_ce_protocol="http" source_docker_ce_protocol="http"
fi fi
fi fi
# registry mirror (best choice for mainland China)
source_docker_registry_address="docker.1ms.run" source_docker_registry_address="docker.1ms.run"
else else
# use official source
source_docker_ce_address="download.docker.com" source_docker_ce_address="download.docker.com"
source_docker_registry_address="registry.hub.docker.com" source_docker_registry_address="registry.hub.docker.com"
fi fi
# run # install docker engine
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \ bash <(curl -sSL https://${script_host}/docker.sh) \
--source "${source_docker_ce_address}" \ --source "${source_docker_ce_address}" \
--source-registry "${source_docker_registry_address}" \ --source-registry "${source_docker_registry_address}" \
--protocol "${source_docker_ce_protocol}" \ --protocol "${source_docker_ce_protocol}" \

22
docs/other/example2.md Normal file
View File

@@ -0,0 +1,22 @@
``` bash
# !/bin/bash
function install_docker() {
if command -v docker &>/dev/null; then
return
fi
bash <(curl -sSL https://${script_host}/docker.sh) \
--install-latest true \
--ignore-backup-tips
if command -v docker &>/dev/null; then
echo -e "\n# Docker installation successful.\n# Please run this script again manually after installation."
exit 0
else
echo -e "\n# Docker installation failed.\n# Please check the error message above."
exit 1
fi
}
install_docker
```

View File

@@ -4,13 +4,15 @@ hide:
- footer - footer
--- ---
# :simple-docker:{style="color: #1d63ed"} Docker Installation & Mirror Switching Script
???+ question "Why do you see this notice?" ???+ question "Why do you see this notice?"
The script of this project currently mainly serves Simplified Chinese users, but from the very beginning it was defined as a universal mirror switching script, providing many command options for customization, which is also one of the reasons why this project is now available to users of other languages. The script output is currently fixed in Simplified Chinese. With feedback and usage from users of other languages, the script may support Traditional Chinese and English in the future. The script of this project currently mainly serves Simplified Chinese users, but from the very beginning it was defined as a universal mirror switching script, providing many command options for customization, which is also one of the reasons why this project is now available to users of other languages. The script output is currently fixed in Simplified Chinese. With feedback and usage from users of other languages, the script may support Traditional Chinese and English in the future.
The documentation is translated with tools, and some professional terms below may be inaccurate. Corrections are welcome. The documentation is translated with tools, and some professional terms below may be inaccurate. Corrections are welcome.
## :simple-docker:{style="color: #1d63ed"} Docker Installation & Mirror Switching Script ## One-Click Command
=== "Install" === "Install"
@@ -35,7 +37,7 @@ hide:
``` ```
> Real-time sync, no delay. Recommended for use in mainland China network environments. > Real-time sync, no delay. Recommended for use in mainland China network environments.
=== ":gitcode: GitCode" === ":simple-gitcode: GitCode"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
@@ -53,7 +55,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh)
``` ```
> Not supported in mainland China network environments. > Not recommended in mainland China network environments.
Integrates installation of [`Docker Engine`](https://docs.docker.com/engine) and [`Docker Compose`](https://docs.docker.com/compose), supports selecting or switching software repositories (Docker repositories) and registry mirrors, installing specific versions, reinstalling, and supports ARM architecture. Integrates installation of [`Docker Engine`](https://docs.docker.com/engine) and [`Docker Compose`](https://docs.docker.com/compose), supports selecting or switching software repositories (Docker repositories) and registry mirrors, installing specific versions, reinstalling, and supports ARM architecture.
@@ -82,7 +84,7 @@ hide:
``` ```
> Real-time sync, no delay. Recommended for use in mainland China network environments. > Real-time sync, no delay. Recommended for use in mainland China network environments.
=== ":gitcode: GitCode" === ":simple-gitcode: GitCode"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry
@@ -100,7 +102,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry
``` ```
> Not supported in mainland China network environments. > Not recommended in mainland China network environments.
<div class="grid cards" markdown> <div class="grid cards" markdown>
@@ -209,205 +211,213 @@ hide:
</div> </div>
- ### Command Options (Advanced Usage) ## Command Options (Advanced Usage)
| Name | Meaning | Value | | Name | Meaning | Value |
| :-: | :-: | :-: | | :-: | :-: | :-: |
| `--source` | Specify `Docker CE` source address (domain or IP) | `address` | | `--source` | Specify `Docker CE` source address (domain or IP) | `address` |
| `--source-registry` | Specify `Docker` registry mirror address (domain or IP) | `address` | | `--source-registry` | Specify `Docker` registry mirror address (domain or IP) | `address` |
| `--branch` | Specify `Docker CE` source repository (path) | `repo name (see docs below)` | | `--branch` | Specify `Docker CE` source repository (path) | `repo name (see docs below)` |
| `--branch-version` | Specify `Docker CE` source repository version | `version (see docs below)` | | `--branch-version` | Specify `Docker CE` source repository version | `version (see docs below)` |
| `--designated-version` | Specify `Docker Engine` installation version | `version (see docs below)` | | `--designated-version` | Specify `Docker Engine` installation version | `version (see docs below)` |
| `--codename` | Specify `Debian-based` OS codename | `codename` | | `--codename` | Specify `Debian-based` OS codename | `codename` |
| `--protocol` | Specify WEB protocol for `Docker CE` source | `http` or `https` | | `--protocol` | Specify WEB protocol for `Docker CE` source | `http` or `https` |
| `--use-intranet-source` | Prefer intranet `Docker CE` source address | `true` or `false` | | `--use-intranet-source` | Prefer intranet `Docker CE` source address | `true` or `false` |
| `--install-latest` | Whether to install the latest `Docker Engine` | `true` or `false` | | `--install-latest` | Whether to install the latest `Docker Engine` | `true` or `false` |
| `--close-firewall` | Whether to disable the firewall | `true` or `false` | | `--close-firewall` | Whether to disable the firewall | `true` or `false` |
| `--clean-screen` | Whether to clear the screen before running | `true` or `false` | | `--clean-screen` | Whether to clear the screen before running | `true` or `false` |
| `--only-registry` | Only switch registry mirror mode | none | | `--only-registry` | Only switch registry mirror mode | none |
| `--ignore-backup-tips` | Ignore backup overwrite prompt (do not backup) | none | | `--ignore-backup-tips` | Ignore backup overwrite prompt (do not backup) | none |
| `--pure-mode` | Pure mode, minimal output | none | | `--pure-mode` | Pure mode, minimal output | none |
> Full source format: `<WEB protocol>://<source address (domain or IP)>/<repository path>` > Full source format: `<WEB protocol>://<source address (domain or IP)>/<repository path>`
- #### Specify Registry Mirror Address - ### Specify Registry Mirror Address
``` { .bash .no-copy } ``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
``` ```
- #### Only Switch Registry Mirror - ### Only Switch Registry Mirror
=== "Use Script for One-Click Replacement" === "Use Script for One-Click Replacement"
Only switches the registry accelerator. If Docker is not installed, an error will be reported and exit. Only switches the registry accelerator. If Docker is not installed, an error will be reported and exit.
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
```
=== "Manual Replacement"
- Install the `jq` package
=== "Debian-based / openKylin"
``` bash
apt-get install -y jq
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
For new systems, run `apt-get update` first.
=== "RedHat-based / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf install -y jq || yum install -y jq
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
- Specify registry mirror address
> Manually replace `<example.registry.com>` with the registry address. See the address column in the "Built-in Registry Mirrors" table above.
``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
You can also specify multiple registry mirrors, e.g., `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`, separated by commas.
- Replace registry mirror address
``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
- Restart Docker service
``` bash
systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- #### Specify Docker CE Source Address
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> Note: The address path must include the Docker CE source repository path, i.e., `docker-ce`.
- #### Specify Docker CE Source Repository
The script will automatically detect this in most cases. Specify only if you have special requirements.
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> Repository names are fixed: `centos`, `debian`, `fedora`, `raspbian`, `rhel`, `sles`, `static`, `ubuntu`
> See [official installation docs](https://docs.docker.com/engine/install) and [Docker CE official repo](https://download.docker.com/linux) for details.
``` { .bash .no-copy title="Can also specify the repository version number." }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> This option can be used to control the compatibility of the installed software package (only applicable to Red Hat operating systems). For details, see the path name (positive integer) representing the version number in the corresponding warehouse directory.
- #### Specify Docker Engine Installation Version
When specifying a version, the "install latest" option is ignored. Format: `major.minor.patch`, e.g., `28.4.1`.
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> If the specified version does not exist or is not supported on your system, the script will report an error and exit.
??? quote "How to view available versions"
=== "Debian-based"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat-based / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
Versions not listed are not supported by this script. If you cannot get the version list, your system environment has not been properly configured for the Docker CE repository (this will not happen when running the script).
- #### Unattended (Automation)
To perform installation without interaction, use at least the following options. Recommended for experienced users.
``` { .bash .no-copy title="Example Command" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> If you get an "invalid option" error, check the option validity and whitespace encoding. Each option is written on a separate line for readability.
- #### Pure Mode
This feature is introduced to facilitate the use of developers and operation and maintenance personnel. After it is enabled, the script content output will be simplified. It is recommended to use it with other command options without interaction.
``` bash ``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
``` ```
!!! tip "Scrolling command logs may have unpredictable display issues, but no problems have been found so far." === "Manual Replacement"
- ### FAQ - Install the `jq` package
- #### About Service Startup Errors === "Debian-based / openKylin"
!!! quote ""
In non-fresh environments, you may encounter `Docker` service startup failures after running the script. It is recommended to reinstall to resolve this. Uninstalling will not delete local images or container data.
Uninstall commands:
=== "Debian-based"
``` bash ``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove apt-get install -y jq
``` ```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` > `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
For new systems, run `apt-get update` first.
=== "RedHat-based / openEuler / OpenCloudOS / Anolis OS" === "RedHat-based / openEuler / OpenCloudOS / Anolis OS"
``` bash ``` bash
yum remove -y docker* containerd.io podman* runc dnf install -y jq || yum install -y jq
``` ```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS` > `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
After uninstalling, simply rerun the script to install. - Specify registry mirror address
- #### About unsupported operating systems > Manually replace `<example.registry.com>` with the registry address. See the address column in the "Built-in Registry Mirrors" table above.
If it prompts that it is not supported, please use the system's own package management tool to install it. Because these packages are built and maintained by the Linux distribution's package maintainers and may have differences in configuration or are built from modified source code. ``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
You can also specify multiple registry mirrors, e.g., `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`, separated by commas.
You can also use [Docker Desktop](https://www.docker.com/products/docker-desktop) - Replace registry mirror address
- ### Best Practices ``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
<details> - Restart Docker service
<summary>Code examples for enterprise product deployment and automated operations such as CI/CD (expand to view)</summary>
--8<-- "docs/other/example.md" ``` bash
</details> systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- ### Specify Docker CE Source Address
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> Note: The address path must include the Docker CE source repository path, i.e., `docker-ce`.
- ### Specify Docker CE Source Repository
The script will automatically detect this in most cases. Specify only if you have special requirements.
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> Repository names are fixed: `centos`, `debian`, `fedora`, `raspbian`, `rhel`, `sles`, `static`, `ubuntu`
> See [official installation docs](https://docs.docker.com/engine/install) and [Docker CE official repo](https://download.docker.com/linux) for details.
``` { .bash .no-copy title="Can also specify the repository version number." }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> This option can be used to control the compatibility of the installed software package (only applicable to Red Hat operating systems). For details, see the path name (positive integer) representing the version number in the corresponding warehouse directory.
- ### Specify Docker Engine Installation Version
When specifying a version, the "install latest" option is ignored. Format: `major.minor.patch`, e.g., `28.4.1`.
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> If the specified version does not exist or is not supported on your system, the script will report an error and exit.
??? quote "How to view available versions"
=== "Debian-based"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat-based / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
Versions not listed are not supported by this script. If you cannot get the version list, your system environment has not been properly configured for the Docker CE repository (this will not happen when running the script).
- ### Unattended (Automation)
To perform installation without interaction, use at least the following options. Recommended for experienced users.
``` { .bash .no-copy title="Example Command" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> If you get an "invalid option" error, check the option validity and whitespace encoding. Each option is written on a separate line for readability.
- ### Pure Mode
This feature is introduced to facilitate the use of developers and operation and maintenance personnel. After it is enabled, the script content output will be simplified. It is recommended to use it with other command options without interaction.
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode
```
!!! tip "Scrolling command logs may have unpredictable display issues, but no problems have been found so far."
## FAQ
- ### About Service Startup Errors
!!! quote ""
In non-fresh environments, you may encounter `Docker` service startup failures after running the script. It is recommended to reinstall to resolve this. Uninstalling will not delete local images or container data.
Uninstall commands:
=== "Debian-based"
``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat-based / openEuler / OpenCloudOS / Anolis OS"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
After uninstalling, simply rerun the script to install.
- ### About unsupported operating systems
If it prompts that it is not supported, please use the system's own package management tool to install it. Because these packages are built and maintained by the Linux distribution's package maintainers and may have differences in configuration or are built from modified source code.
You can also use &nbsp; [![Docker Desktop](/assets/images/icon/custom/docker-desktop.svg){ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
## Best Practices
??? note "Code examples for enterprise product deployment and automated operations such as CI/CD (expand to view)"
If you don't want any user interaction, use the `fully automated` example.
- #### Fully automated (recommended)
--8<-- "docs/other/example1.md"
- #### Simple method
--8<-- "docs/other/example2.md"
> Note: If you don't specify `Docker CE source` and `Image repository source`, the script will be interactively selected by the user. The screen will be automatically cleared (`$ clear`) at this point, which will cause your script's log to be cleared.

View File

@@ -4,7 +4,9 @@ hide:
- footer - footer
--- ---
## :simple-docker:{style="color: #1d63ed"} Docker 安装与换源脚本 # :simple-docker:{style="color: #1d63ed"} Docker 安装与换源脚本
## 一键执行命令
=== "安装" === "安装"
@@ -29,7 +31,7 @@ hide:
``` ```
> 实时同步、无延迟,国内网络环境下推荐使用 > 实时同步、无延迟,国内网络环境下推荐使用
=== ":gitcode: GitCode (镜像仓库)" === ":simple-gitcode: GitCode (镜像仓库)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
@@ -47,7 +49,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh)
``` ```
> 不支持在国内网络环境下使用 > 不建议在国内网络环境下使用
集成安装 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose`](https://docs.docker.com/compose)支持选择或更换软件源Docker 软件仓库)以及镜像仓库、安装指定版本、重装等功能,支持 ARM 架构 集成安装 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose`](https://docs.docker.com/compose)支持选择或更换软件源Docker 软件仓库)以及镜像仓库、安装指定版本、重装等功能,支持 ARM 架构
@@ -76,7 +78,7 @@ hide:
``` ```
> 实时同步、无延迟,国内网络环境下推荐使用 > 实时同步、无延迟,国内网络环境下推荐使用
=== ":gitcode: GitCode (镜像仓库)" === ":simple-gitcode: GitCode (镜像仓库)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry
@@ -94,7 +96,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry
``` ```
> 不支持在国内网络环境下使用 > 不建议在国内网络环境下使用
<div class="grid cards" markdown> <div class="grid cards" markdown>
@@ -203,227 +205,235 @@ hide:
</div> </div>
- ### 命令选项(高级用法) ## 命令选项(高级用法)
<!-- termynal --> <!-- termynal -->
``` ```
$ bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --help $ bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --help
命令选项(名称/含义/值) 命令选项(名称/含义/值)
--source 指定 Docker CE 软件源地址(域名或IP) 地址 --source 指定 Docker CE 软件源地址(域名或IP) 地址
--source-registry 指定 Docker 镜像仓库地址(域名或IP) 地址 --source-registry 指定 Docker 镜像仓库地址(域名或IP) 地址
--branch 指定 Docker CE 软件源仓库(路径) 仓库名 --branch 指定 Docker CE 软件源仓库(路径) 仓库名
--branch-version 指定 Docker CE 软件源仓库版本 版本号 --branch-version 指定 Docker CE 软件源仓库版本 版本号
--designated-version 指定 Docker Engine 安装版本 版本号 --designated-version 指定 Docker Engine 安装版本 版本号
--codename 指定 Debian 系操作系统的版本代号 代号名称 --codename 指定 Debian 系操作系统的版本代号 代号名称
--protocol 指定 Docker CE 软件源的 WEB 协议 http 或 https --protocol 指定 Docker CE 软件源的 WEB 协议 http 或 https
--use-intranet-source 是否优先使用内网 Docker CE 软件源地址 true 或 false --use-intranet-source 是否优先使用内网 Docker CE 软件源地址 true 或 false
--install-latest 是否安装最新版本的 Docker Engine true 或 false --install-latest 是否安装最新版本的 Docker Engine true 或 false
--close-firewall 是否关闭防火墙 true 或 false --close-firewall 是否关闭防火墙 true 或 false
--clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false --clean-screen 是否在运行前清除屏幕上的所有内容 true 或 false
--only-registry 仅更换镜像仓库模式 无 --only-registry 仅更换镜像仓库模式 无
--ignore-backup-tips 忽略覆盖备份提示 无 --ignore-backup-tips 忽略覆盖备份提示 无
--pure-mode 纯净模式,精简打印内容 无 --pure-mode 纯净模式,精简打印内容 无
```
| 名称 | 含义 | 选项值 |
| :-: | :-: | :-: |
| `--source` | 指定 `Docker CE` 源地址(域名或IP) | `地址` |
| `--source-registry` | 指定 `Docker` 镜像仓库地址(域名或IP) | `地址` |
| `--branch` | 指定 `Docker CE` 软件源仓库(路径) | `仓库名(详见下方文档)` |
| `--branch-version` | 指定 `Docker CE` 软件源仓库版本 | `版本号(详见下方文档)` |
| `--designated-version` | 指定 `Docker Engine` 安装版本 | `版本号(详见下方文档)` |
| `--codename` | 指定 `Debian` 系操作系统的版本代号 | `代号名称` |
| `--protocol` | 指定 `Docker CE` 源的 WEB 协议 | `http` 或 `https` |
| `--use-intranet-source` | 是否优先使用内网 `Docker CE` 软件源地址 | `true` 或 `false` |
| `--install-latest` | 是否安装最新版本的 `Docker Engine` | `true` 或 `false` |
| `--close-firewall` | 是否关闭防火墙 | `true` 或 `false` |
| `--clean-screen` | 是否在运行前清除屏幕上的所有内容 | `true` 或 `false` |
| `--only-registry` | 仅更换镜像仓库模式 | 无 |
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
| `--pure-mode` | 纯净模式,精简打印内容 | 无 |
> 软件源完整格式 `<WEB协议>://<软件源地址(域名或IP)>/<软件源仓库(路径)>`
- ### 指定镜像仓库地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
``` ```
| 名称 | 含义 | 选项值 | - ### 仅更换镜像仓库
| :-: | :-: | :-: |
| `--source` | 指定 `Docker CE` 源地址(域名或IP) | `地址` |
| `--source-registry` | 指定 `Docker` 镜像仓库地址(域名或IP) | `地址` |
| `--branch` | 指定 `Docker CE` 软件源仓库(路径) | `仓库名(详见下方文档)` |
| `--branch-version` | 指定 `Docker CE` 软件源仓库版本 | `版本号(详见下方文档)` |
| `--designated-version` | 指定 `Docker Engine` 安装版本 | `版本号(详见下方文档)` |
| `--codename` | 指定 `Debian` 系操作系统的版本代号 | `代号名称` |
| `--protocol` | 指定 `Docker CE` 源的 WEB 协议 | `http` 或 `https` |
| `--use-intranet-source` | 是否优先使用内网 `Docker CE` 软件源地址 | `true` 或 `false` |
| `--install-latest` | 是否安装最新版本的 `Docker Engine` | `true` 或 `false` |
| `--close-firewall` | 是否关闭防火墙 | `true` 或 `false` |
| `--clean-screen` | 是否在运行前清除屏幕上的所有内容 | `true` 或 `false` |
| `--only-registry` | 仅更换镜像仓库模式 | 无 |
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
| `--pure-mode` | 纯净模式,精简打印内容 | 无 |
> 软件源完整格式 `<WEB协议>://<软件源地址(域名或IP)>/<软件源仓库(路径)>` === "使用脚本一键替换"
- #### 指定镜像仓库地址 仅更换镜像加速器,当检测到未安装 Docker 时会报错跳出
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
```
- #### 仅更换镜像仓库
=== "使用脚本一键替换"
仅更换镜像加速器,当检测到未安装 Docker 时会报错跳出
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
```
=== "手动替换"
- 安装 `jq` 软件包
=== "Debian 系 / openKylin"
``` bash
apt-get install -y jq
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
新装系统需要先执行一遍更新 `apt-get update`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf install -y jq || yum install -y jq
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
- 指定镜像仓库地址
> 请手动替换 `<example.registry.com>` 为镜像仓库地址后在执行,详见上方 “项目内置的镜像仓库源” 表格中的地址列
``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
还可以指定多个镜像仓库,如 `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`,注意用英文逗号分割
- 替换镜像仓库地址
``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
- 重启 Docker 服务
``` bash
systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- #### 指定 Docker CE 软件源地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意该地址路径需要包含镜像站的 Docker CE 软件源仓库路径即 `docker-ce`
- #### 指定 Docker CE 软件源仓库
脚本默认会自动判断一般无需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 仓库名是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 这几个
> 具体详见 [官方安装文档](https://docs.docker.com/engine/install) 和 [Docker CE 官方仓库](https://download.docker.com/linux)
``` { .bash .no-copy title="还可以指定仓库版本号" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> 可以使用该选项来控制安装软件包的兼容性(仅适用于红帽系操作系统),具体详见对应仓库目录中代表版本号的路径名称(正整数)。
- #### 指定 Docker Engine 安装版本
指定安装版本时会忽略 `是否安装最新版本` 的命令选项,格式为 `主版本.次版本.补丁版本`,例如 `28.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> 如果指定的版本不存在或者不支持当前系统,届时脚本会报错跳出
??? quote "查看版本列表的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出现在该列表中的版本则不支持通过本脚本安装,如果获取不到版本列表说明你当前的系统环境还没有正确配置 Docker CE 软件源(运行脚本时不存在该问题)
- #### 无人值守(自动化)
不通过交互完成安装操作,至少需要使用如下命令选项来实现,建议熟悉后再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> 如果报错 `命令选项无效` 那么请检查选项合法性以及空格字符编码,在示例中一行写一个选项是为了提高命令的可读性
- #### 纯净模式
推出该功能是为了便于开发以及运维人员使用,启用后会精简脚本内容输出,建议搭配其它命令选项无交互使用
``` bash ``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
``` ```
!!! tip "滚动输出的命令日志可能存在无法预料的显示问题,不过目前暂未发现异常" === "手动替换"
- ### 常见问题 - 安装 `jq` 软件包
- #### 关于服务报错无法启动 === "Debian 系 / openKylin"
!!! quote ""
非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除本地镜像和容器数据
卸载命令如下:
=== "Debian 系"
``` bash ``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove apt-get install -y jq
``` ```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` > `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
新装系统需要先执行一遍更新 `apt-get update`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS" === "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash ``` bash
yum remove -y docker* containerd.io podman* runc dnf install -y jq || yum install -y jq
``` ```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS` > `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸载完成后重新执行脚本安装即可 - 指定镜像仓库地址
- #### 关于不支持的操作系统 > 请手动替换 `<example.registry.com>` 为镜像仓库地址后在执行,详见上方 “项目内置的镜像仓库源” 表格中的地址列
如果提示不支持那么请使用系统自带的包管理工具进行安装。因为这些软件包由 Linux 发行版的软件包维护者构建和维护,可能存在配置差异或由修改后的源代码构建。 ``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
还可以指定多个镜像仓库,如 `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`,注意用英文逗号分割
也可以使用 [Docker Desktop](https://www.docker.com/products/docker-desktop) - 替换镜像仓库地址
- ### 最佳实践 ``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
<details> - 重启 Docker 服务
<summary>适用于企业产品部署以及 CI/CD 等自动化运维场景的代码示例(展开查看)</summary>
--8<-- "docs/other/example.md" ``` bash
</details> systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- ### 指定 Docker CE 软件源地址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意该地址路径需要包含镜像站的 Docker CE 软件源仓库路径即 `docker-ce`
- ### 指定 Docker CE 软件源仓库
脚本默认会自动判断一般无需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 仓库名是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 这几个
> 具体详见 [官方安装文档](https://docs.docker.com/engine/install) 和 [Docker CE 官方仓库](https://download.docker.com/linux)
``` { .bash .no-copy title="还可以指定仓库版本号" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> 可以使用该选项来控制安装软件包的兼容性(仅适用于红帽系操作系统),具体详见对应仓库目录中代表版本号的路径名称(正整数)。
- ### 指定 Docker Engine 安装版本
指定安装版本时会忽略 `是否安装最新版本` 的命令选项,格式为 `主版本.次版本.补丁版本`,例如 `28.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> 如果指定的版本不存在或者不支持当前系统,届时脚本会报错跳出
??? quote "查看版本列表的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出现在该列表中的版本则不支持通过本脚本安装,如果获取不到版本列表说明你当前的系统环境还没有正确配置 Docker CE 软件源(运行脚本时不存在该问题)
- ### 无人值守(自动化)
不通过交互完成安装操作,至少需要使用如下命令选项来实现,建议熟悉后再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> 如果报错 `命令选项无效` 那么请检查选项合法性以及空格字符编码,在示例中一行写一个选项是为了提高命令的可读性
- ### 纯净模式
推出该功能是为了便于开发以及运维人员使用,启用后会精简脚本内容输出,建议搭配其它命令选项无交互使用
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode
```
!!! tip "滚动输出的命令日志可能存在无法预料的显示问题,不过目前暂未发现异常"
## 常见问题
- ### 关于服务报错无法启动
!!! quote ""
非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除本地镜像和容器数据
卸载命令如下:
=== "Debian 系"
``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸载完成后重新执行脚本安装即可
- ### 关于不支持的操作系统
如果提示不支持那么请使用系统自带的包管理工具进行安装。因为这些软件包由 Linux 发行版的软件包维护者构建和维护,可能存在配置差异或由修改后的源代码构建。
也可以使用 &nbsp; [![Docker Desktop](/assets/images/icon/custom/docker-desktop.svg){ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
## 最佳实践
??? note "适用于企业产品部署以及 CI/CD 等自动化运维场景的代码示例(展开查看)"
如果你不想让用户进行任何交互,请使用 `完全自动化` 示例
- #### 完全自动化(推荐)
--8<-- "docs/other/example1.md"
- #### 简易方式
--8<-- "docs/other/example2.md"
> 注:不指定 `Docker CE 源` 以及 `镜像仓库源` 则会交由用户进行交互选择,届时会自动清屏 `$ clear`,从而导致你脚本的运行日志被清除

View File

@@ -4,13 +4,15 @@ hide:
- footer - footer
--- ---
# :simple-docker:{style="color: #1d63ed"} Docker 安裝與換源腳本
???+ question "為什麼會看到該提示?" ???+ question "為什麼會看到該提示?"
本項目腳本目前主要服務於簡體中文用戶,但是從立項之初就定義為了通用換源腳本,提供了諸多命令選項用於自定義使用,這也是本項目為什麼開始面向其它語言用戶使用的原因之一。腳本列印內容目前固定為簡體中文,隨著其它語言使用者的回饋和使用,腳本將來可能會支援繁體中文和英文。 本項目腳本目前主要服務於簡體中文用戶,但是從立項之初就定義為了通用換源腳本,提供了諸多命令選項用於自定義使用,這也是本項目為什麼開始面向其它語言用戶使用的原因之一。腳本列印內容目前固定為簡體中文,隨著其它語言使用者的回饋和使用,腳本將來可能會支援繁體中文和英文。
文檔使用工具進行翻譯,下方內容中的專業術語可能存在不準確的情況,歡迎修正。 文檔使用工具進行翻譯,下方內容中的專業術語可能存在不準確的情況,歡迎修正。
## :simple-docker:{style="color: #1d63ed"} Docker 安裝與換源腳本 ## 一鍵執行命令
=== "安裝" === "安裝"
@@ -35,7 +37,7 @@ hide:
``` ```
> 即時同步、無延遲,中國大陸網路環境建議使用 > 即時同步、無延遲,中國大陸網路環境建議使用
=== ":gitcode: GitCode (鏡像倉庫)" === ":simple-gitcode: GitCode (鏡像倉庫)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
@@ -53,7 +55,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh)
``` ```
> 不支援在中國大陸網路環境下使用 > 不建議在中國大陸網路環境下使用
整合安裝 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose`](https://docs.docker.com/compose)支援選擇或更換軟體源Docker 軟體倉庫)以及鏡像倉庫、安裝指定版本、重裝等功能,支援 ARM 架構 整合安裝 [`Docker Engine`](https://docs.docker.com/engine) 和 [`Docker Compose`](https://docs.docker.com/compose)支援選擇或更換軟體源Docker 軟體倉庫)以及鏡像倉庫、安裝指定版本、重裝等功能,支援 ARM 架構
@@ -82,7 +84,7 @@ hide:
``` ```
> 即時同步、無延遲,中國大陸網路環境建議使用 > 即時同步、無延遲,中國大陸網路環境建議使用
=== ":gitcode: GitCode (鏡像倉庫)" === ":simple-gitcode: GitCode (鏡像倉庫)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh) --only-registry
@@ -100,7 +102,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry bash <(curl -sSL https://edgeone.linuxmirrors.cn/docker.sh) --only-registry
``` ```
> 不支援在中國大陸網路環境下使用 > 不建議在中國大陸網路環境下使用
<div class="grid cards" markdown> <div class="grid cards" markdown>
@@ -209,205 +211,213 @@ hide:
</div> </div>
- ### 命令選項(進階用法) ## 命令選項(進階用法)
| 名稱 | 意義 | 選項值 | | 名稱 | 意義 | 選項值 |
| :-: | :-: | :-: | | :-: | :-: | :-: |
| `--source` | 指定 `Docker CE` 軟體源位址(網域名稱或IP) | `位址` | | `--source` | 指定 `Docker CE` 軟體源位址(網域名稱或IP) | `位址` |
| `--source-registry` | 指定 `Docker` 鏡像倉庫位址(網域名稱或IP) | `位址` | | `--source-registry` | 指定 `Docker` 鏡像倉庫位址(網域名稱或IP) | `位址` |
| `--branch` | 指定 `Docker CE` 軟體源倉庫(路徑) | `倉庫名稱(詳見下方文檔)` | | `--branch` | 指定 `Docker CE` 軟體源倉庫(路徑) | `倉庫名稱(詳見下方文檔)` |
| `--branch-version` | 指定 `Docker CE` 軟體源倉庫版本 | `版本號(詳見下方文檔)` | | `--branch-version` | 指定 `Docker CE` 軟體源倉庫版本 | `版本號(詳見下方文檔)` |
| `--designated-version` | 指定 `Docker Engine` 安裝版本 | `版本號(詳見下方文檔)` | | `--designated-version` | 指定 `Docker Engine` 安裝版本 | `版本號(詳見下方文檔)` |
| `--codename` | 指定 `Debian` 係作業系統的版本代號 | `代號名稱` | | `--codename` | 指定 `Debian` 係作業系統的版本代號 | `代號名稱` |
| `--protocol` | 指定 `Docker CE` 源的 WEB 協議 | `http` 或 `https` | | `--protocol` | 指定 `Docker CE` 源的 WEB 協議 | `http` 或 `https` |
| `--use-intranet-source` | 是否優先使用內部網路 `Docker CE` 軟體源位址 | `true` 或 `false` | | `--use-intranet-source` | 是否優先使用內部網路 `Docker CE` 軟體源位址 | `true` 或 `false` |
| `--install-latest` | 是否安裝最新版本的 `Docker Engine` | `true` 或 `false` | | `--install-latest` | 是否安裝最新版本的 `Docker Engine` | `true` 或 `false` |
| `--close-firewall` | 是否關閉防火牆 | `true` 或 `false` | | `--close-firewall` | 是否關閉防火牆 | `true` 或 `false` |
| `--clean-screen` | 是否在運行前清除螢幕上的所有內容 | `true` 或 `false` | | `--clean-screen` | 是否在運行前清除螢幕上的所有內容 | `true` 或 `false` |
| `--only-registry` | 僅更換鏡像倉庫模式 | 無 | | `--only-registry` | 僅更換鏡像倉庫模式 | 無 |
| `--ignore-backup-tips` | 忽略覆蓋備份提示(即不覆蓋備份) | | `--ignore-backup-tips` | 忽略覆蓋備份提示(即不覆蓋備份) |
| `--pure-mode` | 純淨模式,精簡列印內容 | 無 | | `--pure-mode` | 純淨模式,精簡列印內容 | 無 |
> 軟體源完整格式 `<WEB協議>://<軟體源位址(網域名稱或IP)>/<軟體源倉庫(路徑)>` > 軟體源完整格式 `<WEB協議>://<軟體源位址(網域名稱或IP)>/<軟體源倉庫(路徑)>`
- #### 指定鏡像倉庫位址 - ### 指定鏡像倉庫位址
``` { .bash .no-copy } ``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source-registry registry.example.com
``` ```
- #### 僅更換鏡像倉庫 - ### 僅更換鏡像倉庫
=== "使用腳本一鍵替換" === "使用腳本一鍵替換"
僅更換鏡像加速器,當偵測到未安裝 Docker 時會報錯跳出 僅更換鏡像加速器,當偵測到未安裝 Docker 時會報錯跳出
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
```
=== "手動替換"
- 安裝 `jq` 軟體包
=== "Debian 係 / openKylin"
``` bash
apt-get install -y jq
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
新裝系統需要先執行一次更新 `apt-get update`
=== "RedHat 係 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf install -y jq || yum install -y jq
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
- 指定鏡像倉庫位址
> 請手動替換 `<example.registry.com>` 為鏡像倉庫位址後在執行,詳見上方 “項目內置的鏡像倉庫源” 表格中的位址列
``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
也可以指定多個鏡像倉庫,如 `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`,注意用英文逗號分割
- 替換鏡像倉庫位址
``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
- 重新啟動 Docker 服務
``` bash
systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- #### 指定 `Docker CE` 軟體源位址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意該位址路徑需要包含映像站的 Docker CE 軟體源倉庫路徑即 `docker-ce`
- #### 指定 Docker CE 軟體源倉庫
腳本預設會自動判斷一般無需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 倉庫名稱是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 這幾個
> 詳情請見 [官方安裝文檔](https://docs.docker.com/engine/install) 及 [Docker CE 官方倉庫](https://download.docker.com/linux)
``` { .bash .no-copy title="还可以指定倉庫版本號" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> 可以使用此選項來控制安裝軟體套件的相容性(僅適用於紅帽係作業系統),具體詳見對應倉庫目錄中代表版本號的路徑名稱(正整數)。
- #### 指定 Docker Engine 安裝版本
指定安裝版本時會忽略 `是否安裝最新版本` 的命令選項,格式為 `主版.次版本.補丁版本`,例如 `28.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> 如果指定的版本不存在或不支援目前系統,屆時腳本會報錯跳出
??? quote "查看版本清單的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出現在該清單中的版本則不支援透過本腳本安裝,如果取得不到版本清單說明你目前的系統環境還沒有正確配置 Docker CE 軟體軟體源(執行腳本時不存在該問題)
- #### 無人值守(自動化)
不透過交互完成安裝操作,至少需要使用以下命令選項來實現,建議熟悉後再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> 如果報錯 `命令選項無效` 那麼請檢查選項合法性以及空格字元編碼,在範例中一行寫一個選項是為了提高命令的可讀性
- #### 純淨模式
推出此功能是為了方便開發以及运维人員使用,啟用後會精簡腳本內容輸出,建議搭配其它指令選項無互動使用
``` bash ``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --only-registry
``` ```
!!! tip "滾動輸出的命令日誌可能有無法預料的顯示問題,不過目前暫未發現異常" === "手動替換"
- ### 常見問題 - 安裝 `jq` 軟體包
- #### 關於服務報錯無法啟動 === "Debian 係 / openKylin"
!!! quote ""
非新裝環境可能會在執行腳本後遇到 `Docker` 服務無法啟動的情況,建議重新安裝來解決,卸載不會刪除本機映像和容器資料
卸載指令如下:
=== "Debian 系"
``` bash ``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove apt-get install -y jq
``` ```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` > `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS` &nbsp; `openKylin`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS" 新裝系統需要先執行一次更新 `apt-get update`
=== "RedHat 係 / openEuler / OpenCloudOS / Anolis OS"
``` bash ``` bash
yum remove -y docker* containerd.io podman* runc dnf install -y jq || yum install -y jq
``` ```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS` > `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸載完成後重新執行腳本安裝即可 - 指定鏡像倉庫位址
- #### 關於不支援的作業系統 > 請手動替換 `<example.registry.com>` 為鏡像倉庫位址後在執行,詳見上方 “項目內置的鏡像倉庫源” 表格中的位址列
如果提示不支援那麼請使用系統自備的套件管理工具進行安裝。因為這些軟體包由 Linux 發行版的軟體包維護者建構和維護,可能存在配置差異或由修改後的原始碼建構。 ``` bash
SOURCE_REGISTRY='"https://<example.registry.com>"'
```
也可以指定多個鏡像倉庫,如 `SOURCE_REGISTRY='"https://example.registry.com","https://test.registry.com"'`,注意用英文逗號分割
也可以使用 [Docker Desktop](https://www.docker.com/products/docker-desktop) - 替換鏡像倉庫位址
- ### 最佳實踐 ``` bash
[ -s "/etc/docker/daemon.json" ] || echo "{}" >/etc/docker/daemon.json
jq '.["registry-mirrors"] = ['"${SOURCE_REGISTRY}"']' /etc/docker/daemon.json >/etc/docker/daemon.json.tmp && mv /etc/docker/daemon.json.tmp
```
<details> - 重新啟動 Docker 服務
<summary>適用於企業產品部署以及 CI/CD 等自動化維運場景的程式碼範例(展開檢視)</summary>
--8<-- "docs/other/example.md" ``` bash
</details> systemctl daemon-reload
[[ $(systemctl is-active docker) == "active" ]] && systemctl restart docker || systemctl enable --now docker
```
- ### 指定 `Docker CE` 軟體源位址
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --source mirror.example.com/docker-ce
```
> 注意該位址路徑需要包含映像站的 Docker CE 軟體源倉庫路徑即 `docker-ce`
- ### 指定 Docker CE 軟體源倉庫
腳本預設會自動判斷一般無需指定,除非你有特殊需求
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --branch centos
```
> 倉庫名稱是固定的,目前只有 `centos` `debian` `fedora` `raspbian` `rhel` `sles` `static` `ubuntu` 這幾個
> 詳情請見 [官方安裝文檔](https://docs.docker.com/engine/install) 及 [Docker CE 官方倉庫](https://download.docker.com/linux)
``` { .bash .no-copy title="还可以指定倉庫版本號" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--branch centos \
--branch-version 9
```
> 可以使用此選項來控制安裝軟體套件的相容性(僅適用於紅帽係作業系統),具體詳見對應倉庫目錄中代表版本號的路徑名稱(正整數)。
- ### 指定 Docker Engine 安裝版本
指定安裝版本時會忽略 `是否安裝最新版本` 的命令選項,格式為 `主版.次版本.補丁版本`,例如 `28.4.1`。
``` { .bash .no-copy }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --designated-version 28.0.0
```
> 如果指定的版本不存在或不支援目前系統,屆時腳本會報錯跳出
??? quote "查看版本清單的方法"
=== "Debian 系"
``` bash
apt-cache madison docker-ce | awk '{print $3}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
dnf list docker-ce --showduplicates | sort -r | awk '{print $2}' | grep -Eo "[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}" | sort -t '.' -k1,1nr -k2,2nr -k3,3nr
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
未出現在該清單中的版本則不支援透過本腳本安裝,如果取得不到版本清單說明你目前的系統環境還沒有正確配置 Docker CE 軟體軟體源(執行腳本時不存在該問題)
- ### 無人值守(自動化)
不透過交互完成安裝操作,至少需要使用以下命令選項來實現,建議熟悉後再使用
``` { .bash .no-copy title="参考命令" }
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) \
--source mirror.example.com/docker-ce \
--source-registry registry.hub.docker.com \
--protocol http \
--use-intranet-source false \
--install-latest true \
--close-firewall true \
--ignore-backup-tips
```
> 如果報錯 `命令選項無效` 那麼請檢查選項合法性以及空格字元編碼,在範例中一行寫一個選項是為了提高命令的可讀性
- ### 純淨模式
推出此功能是為了方便開發以及运维人員使用,啟用後會精簡腳本內容輸出,建議搭配其它指令選項無互動使用
``` bash
bash <(curl -sSL https://linuxmirrors.cn/docker.sh) --pure-mode
```
!!! tip "滾動輸出的命令日誌可能有無法預料的顯示問題,不過目前暫未發現異常"
## 常見問題
- ### 關於服務報錯無法啟動
!!! quote ""
非新裝環境可能會在執行腳本後遇到 `Docker` 服務無法啟動的情況,建議重新安裝來解決,卸載不會刪除本機映像和容器資料
卸載指令如下:
=== "Debian 系"
``` bash
apt-get remove -y docker* containerd.io runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali` &nbsp; `Linux Mint` &nbsp; `Deepin` &nbsp; `Zorin OS` &nbsp; `Armbian` &nbsp; `Proxmox VE` &nbsp; `Raspberry Pi OS`
=== "RedHat 系 / openEuler / OpenCloudOS / Anolis OS"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `openEuler` &nbsp; `OpenCloudOS` &nbsp; `Anolis OS`
卸載完成後重新執行腳本安裝即可
- ### 關於不支援的作業系統
如果提示不支援那麼請使用系統自備的套件管理工具進行安裝。因為這些軟體包由 Linux 發行版的軟體包維護者建構和維護,可能存在配置差異或由修改後的原始碼建構。
也可以使用 &nbsp; [![Docker Desktop](/assets/images/icon/custom/docker-desktop.svg){ width="140" style="vertical-align: -0.2rem" }](https://www.docker.com/products/docker-desktop)
- ## 最佳實踐
??? note "適用於企業產品部署以及 CI/CD 等自動化維運場景的程式碼範例(展開檢視)"
如果你不想讓用戶進行任何交互,請使用 `完全自動化` 範例
- #### 完全自動化(建議)
--8<-- "docs/other/example1.md"
- #### 簡易方式
--8<-- "docs/other/example2.md"
> 註:不指定 `Docker CE 源` 以及 `鏡像倉庫源` 則會交由使用者進行互動選擇,屆時會自動清屏 `$ clear`,從而導致你腳本的運行日誌被清除

View File

@@ -17,18 +17,18 @@
--md-footer-bg-color--dark: hsla(var(--md-hue), 5%, 12%, 1); --md-footer-bg-color--dark: hsla(var(--md-hue), 5%, 12%, 1);
--navbar-background: hsla(var(--md-hue), 5%, 19%, 0.33); --navbar-background: hsla(var(--md-hue), 5%, 19%, 0.33);
--hero-background-image: linear-gradient(90deg, rgb(88 88 88) 50%, rgb(88 88 88) 50%); --hero-background-image: linear-gradient(90deg, rgb(88 88 88) 50%, rgb(88 88 88) 50%);
--component-hover-color: rgba(240, 241, 244, 0.034); --component-hover-color: rgba(240, 241, 244, 0.05);
} }
[data-md-color-primary=white] { [data-md-color-primary=white] {
--md-typeset-a-color: #2080f0; --md-typeset-a-color: #1677ff;
--md-accent-fg-color: #52a1fc; --md-accent-fg-color: #0059ff;
--md-accent-fg-color--transparent: #52a1fc1a; --md-accent-fg-color--transparent: #52a1fc1a;
} }
[data-md-color-scheme='slate'][data-md-color-primary=black] { [data-md-color-scheme='slate'][data-md-color-primary=black] {
--md-typeset-a-color: #5b84f5; --md-typeset-a-color: #5b84f5;
--md-accent-fg-color: #4172f7; --md-accent-fg-color: #3a75f5;
--md-accent-fg-color--transparent: #4172f71a; --md-accent-fg-color--transparent: #4172f71a;
} }
@@ -167,6 +167,11 @@
backdrop-filter: blur(8px); backdrop-filter: blur(8px);
} }
.md-header__topic {
user-select: none;
-webkit-user-select: none;
}
.md-tabs { .md-tabs {
background-color: var(--navbar-background) !important; background-color: var(--navbar-background) !important;
} }
@@ -239,29 +244,85 @@
border-radius: var(--component-border-radius); border-radius: var(--component-border-radius);
} }
[data-md-color-scheme='slate'] .md-select__inner {
background-color: rgb(22, 22, 22) !important;
}
.md-select__inner .md-select__list { .md-select__inner .md-select__list {
padding: var(--component-border-radius) !important; padding: 6px !important;
font-size: .75rem !important; font-size: .75rem !important;
border-radius: var(--component-border-radius) !important;
} }
.md-select__inner .md-select__list .md-select__item { .md-select__inner .md-select__list .md-select__item {
margin: 1px; margin: 1px;
border-radius: var(--component-border-radius); border-radius: var(--component-border-radius) !important;
transition: background-color 0.2s; transition: background-color 0.2s;
} }
[dir=ltr] .md-select__inner .md-select__list .md-select__item .md-select__link { .md-select__inner .md-select__list .md-select__item .md-select__link {
border-radius: var(--component-border-radius);
padding-left: 12px !important; padding-left: 12px !important;
padding-right: 12px !important; padding-right: 12px !important;
} }
.md-select__inner .md-select__list .md-select__item:hover { .md-select__inner .md-select__list .md-select__item:hover {
background-color: rgb(243, 243, 245); background-color: var(--component-hover-color);
} }
[data-md-color-scheme='slate'] .md-select__inner .md-select__list .md-select__item:hover { .md-header__button>*:first-child,
background-color: rgba(255, 255, 255, 0.07); .md-header__button svg {
height: 24px !important;
width: 24px !important;
}
@media screen and (min-width: 768px) {
.md-header__button {
border-radius: 6px;
padding: 6px !important;
transition: background-color 0.2s ease-in-out !important;
}
.md-header__button.md-logo {
margin-left: .4rem !important;
-webkit-user-drag: none;
}
.md-header__button>*:first-child,
.md-header__button svg {
height: 28px !important;
width: 28px !important;
}
.md-header__button:hover {
opacity: 1 !important;
background-color: hsla(var(--md-hue), 0%, 0%, .07) !important;
}
[data-md-color-scheme='slate'] .md-header__button:hover {
background-color: rgba(240, 241, 244, 0.1) !important;
}
.md-source__repository {
border-radius: 6px !important;
padding: 4px 8px 4px 48px !important;
transition: all 0.2s ease-in-out !important;
}
.md-source__icon+.md-source__repository {
height: 100%;
}
.md-source__repository--active:hover {
background-color: hsla(var(--md-hue), 0%, 0%, .07) !important;
}
.md-source:hover {
opacity: 1 !important;
}
[data-md-color-scheme='slate'] .md-source__repository--active:hover {
background-color: rgba(240, 241, 244, 0.1) !important;
}
} }
.palette-icon svg { .palette-icon svg {
@@ -271,25 +332,23 @@
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.palette-icon svg { .palette-icon svg {
width: 22px; width: 24px;
height: 22px; height: 24px;
} }
} }
.md-typeset__table .twemoji svg { .md-typeset__table .twemoji svg {
fill: var(--md-default-fg-color--light) !important; fill: var(--md-default-fg-color--light) !important;
} }
.md-tooltip, .md-tooltip,
.md-tooltip2__inner { .md-tooltip2__inner {
border-radius: 5px !important; border-radius: 5px !important;
} }
.md-typeset a {
transition: color 0ms;
}
.tabbed-labels a { .tabbed-labels a {
position: relative; position: relative;
transition: color 0ms !important;
} }
.tabbed-labels a::before { .tabbed-labels a::before {
@@ -322,6 +381,16 @@
margin: 1em 0 !important; margin: 1em 0 !important;
} }
.md-typeset table,
.md-typeset pre>code,
.md-typeset .grid.cards>ul>li {
border-radius: var(--component-border-radius) !important;
}
.md-typeset code {
border-radius: 4px !important;
}
/* HERO */ /* HERO */
.hero { .hero {
width: 390px; width: 390px;
@@ -664,6 +733,7 @@
/* termynal 插件 */ /* termynal 插件 */
.termy { .termy {
padding: 65px 25px 35px !important; padding: 65px 25px 35px !important;
border-radius: var(--component-border-radius) !important;
} }
[data-termynal] { [data-termynal] {

View File

@@ -22,7 +22,7 @@
</a> </a>
<label class="md-header__button md-icon" for="__drawer"> <label class="md-header__button md-icon" for="__drawer">
{% set icon = config.theme.icon.menu or "material/menu" %} {% set icon = config.theme.icon.menu or "octicons/list-unordered-16" %}
{% include ".icons/" ~ icon ~ ".svg" %} {% include ".icons/" ~ icon ~ ".svg" %}
</label> </label>
@@ -63,7 +63,7 @@
{% set search = config.plugins["material/search"] | attr("config") %} {% set search = config.plugins["material/search"] | attr("config") %}
{% if search.enabled %} {% if search.enabled %}
<label class="md-header__button md-icon" for="__search"> <label class="md-header__button md-icon" for="__search">
{% set icon = config.theme.icon.search or "material/magnify" %} {% set icon = config.theme.icon.search or "octicons/search-16" %}
{% include ".icons/" ~ icon ~ ".svg" %} {% include ".icons/" ~ icon ~ ".svg" %}
</label> </label>
{% include "partials/search.html" %} {% include "partials/search.html" %}

View File

@@ -1,4 +1,4 @@
<a class="md-header__button md-icon" href="https://www.coze.cn/store/agent/7503197985959428108?bot_id=true" target="_blank" title="{{'Coze AI Assistant' if i18n_page_locale == 'en' else 'Coze AI 助手' if i18n_page_locale == 'zh-Hant' else '扣子 AI 助手'}}"> <a class="md-header__button md-icon coze-icon-wrapper" href="https://www.coze.cn/store/agent/7503197985959428108?bot_id=true" target="_blank" title="{{'Coze AI Assistant' if i18n_page_locale == 'en' else 'Coze AI 助手' if i18n_page_locale == 'zh-Hant' else '扣子 AI 助手'}}">
<div aria-label="Coze" class="coze-icon-bg"> <div aria-label="Coze" class="coze-icon-bg">
<svg fill="currentColor" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" color="#fff" style="display: block; margin: auto;"> <svg fill="currentColor" fill-rule="evenodd" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" color="#fff" style="display: block; margin: auto;">
<path clip-rule="evenodd" d="M3.908 9.096A8.092 8.092 0 0111.998 1h.006c4.468 0 8.09 3.628 8.09 8.096v3.392h1.942c2.23 0 2.732 3.126.615 3.828l-2.556.85v1.466a1.947 1.947 0 01-2.818 1.742l-1.42-.707c-.067-.03-.149 0-.17.071-1.147 3.587-6.225 3.587-7.373 0a.123.123 0 00-.169-.07l-1.42.706c-1.29.65-2.817-.292-2.817-1.742v-1.466l-2.557-.85c-2.122-.697-1.614-3.828.615-3.828h1.942V9.096zm4.571 2.613a.784.784 0 00-.784.784v1.568a.784.784 0 101.568 0v-1.568a.784.784 0 00-.784-.784zm7.045.779a.784.784 0 100 1.568.784.784 0 000-1.568zm-6.186 3.415a.78.78 0 00.17.254 3.517 3.517 0 004.98 0 .782.782 0 10-1.106-1.107 1.958 1.958 0 01-2.767 0 .78.78 0 00-1.277.254.78.78 0 000 .6z"></path> <path clip-rule="evenodd" d="M3.908 9.096A8.092 8.092 0 0111.998 1h.006c4.468 0 8.09 3.628 8.09 8.096v3.392h1.942c2.23 0 2.732 3.126.615 3.828l-2.556.85v1.466a1.947 1.947 0 01-2.818 1.742l-1.42-.707c-.067-.03-.149 0-.17.071-1.147 3.587-6.225 3.587-7.373 0a.123.123 0 00-.169-.07l-1.42.706c-1.29.65-2.817-.292-2.817-1.742v-1.466l-2.557-.85c-2.122-.697-1.614-3.828.615-3.828h1.942V9.096zm4.571 2.613a.784.784 0 00-.784.784v1.568a.784.784 0 101.568 0v-1.568a.784.784 0 00-.784-.784zm7.045.779a.784.784 0 100 1.568.784.784 0 000-1.568zm-6.186 3.415a.78.78 0 00.17.254 3.517 3.517 0 004.98 0 .782.782 0 10-1.106-1.107 1.958 1.958 0 01-2.767 0 .78.78 0 00-1.277.254.78.78 0 000 .6z"></path>
@@ -8,7 +8,7 @@
<div class="md-search__inner" role="search"> <div class="md-search__inner" role="search">
<form class="md-search__form" name="search" onsubmit="return false;"> <form class="md-search__form" name="search" onsubmit="return false;">
<input type="text" class="md-search__input" style="cursor: pointer !important;" name="query" aria-label="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" placeholder="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" readonly required onclick="OpenOramaSearchComponent()" /> <input type="text" class="md-search__input" name="query" aria-label="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" placeholder="{{'AI Search' if i18n_page_locale == 'en' else 'AI 搜尋' if i18n_page_locale == 'zh-Hant' else 'AI 搜索'}}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" readonly required onclick="OpenOramaSearchComponent()" />
<label class="md-search__icon md-icon" for="__search" onclick="OpenOramaSearchComponent()"> {% set icon = config.theme.icon.search or "material/magnify" %} {% include ".icons/" ~ icon ~ ".svg" %} {% set icon = config.theme.icon.previous or "material/arrow-left" %} {% include ".icons/" ~ icon ~ ".svg" %} </label> <label class="md-search__icon md-icon" for="__search" onclick="OpenOramaSearchComponent()"> {% set icon = config.theme.icon.search or "material/magnify" %} {% include ".icons/" ~ icon ~ ".svg" %} {% set icon = config.theme.icon.previous or "material/arrow-left" %} {% include ".icons/" ~ icon ~ ".svg" %} </label>
</form> </form>
<div class="md-search__output"> <div class="md-search__output">
@@ -61,7 +61,10 @@
display: none !important; display: none !important;
} }
.md-search__inner { .md-search__inner {
padding-left: 4px; padding-left: 8px;
}
.md-search__input {
cursor: pointer !important;
} }
.md-search__form { .md-search__form {
border-radius: 6px; border-radius: 6px;
@@ -80,11 +83,16 @@
color: #fff; color: #fff;
height: 28px; height: 28px;
width: 28px; width: 28px;
margin-left: 2px;
} }
.coze-icon-bg svg { .coze-icon-bg svg {
width: 20px !important; width: 20px !important;
height: 20px !important; height: 20px !important;
display: block; display: block;
} }
.coze-icon-wrapper {
@media screen and (max-width: 768px) {
display: none !important;
}
}
</style> </style>

View File

@@ -35,7 +35,7 @@ hide:
``` ```
> Real-time sync, no delay. Recommended for use in mainland China network environments. > Real-time sync, no delay. Recommended for use in mainland China network environments.
=== ":gitcode: GitCode" === ":simple-gitcode: GitCode"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
@@ -53,7 +53,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh)
``` ```
> Not supported in mainland China network environments. > Not recommended in mainland China network environments.
=== ":material-earth: International Regions" === ":material-earth: International Regions"
@@ -78,7 +78,7 @@ hide:
``` ```
> Real-time sync, no delay. Recommended for use in mainland China network environments. > Real-time sync, no delay. Recommended for use in mainland China network environments.
=== ":gitcode: GitCode" === ":simple-gitcode: GitCode"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad
@@ -96,7 +96,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad
``` ```
> Not supported in mainland China network environments. > Not recommended in mainland China network environments.
=== ":material-library: China Education Network" === ":material-library: China Education Network"
@@ -121,7 +121,7 @@ hide:
``` ```
> Real-time sync, no delay. Recommended for use in mainland China network environments. > Real-time sync, no delay. Recommended for use in mainland China network environments.
=== ":gitcode: GitCode" === ":simple-gitcode: GitCode"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu
@@ -139,7 +139,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu
``` ```
> Not supported in mainland China network environments. > Not recommended in mainland China network environments.
@@ -399,7 +399,7 @@ hide:
!!! quote "" !!! quote ""
The project uses [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) to automatically copy the source code to the docs directory after each commit for website publishing. The site is hosted on :netlify: [Netlify](https://www.netlify.com), with almost no risk of hijacking. The project uses [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) to automatically copy the source code to the docs directory after each commit for website publishing. The site is hosted on [:netlify: Netlify](https://www.netlify.com), with almost no risk of hijacking.
You can also use the raw address from the code repository. This is just to explain why there are several different addresses; the default official site address is easier to remember and access. You can also use the raw address from the code repository. This is just to explain why there are several different addresses; the default official site address is easier to remember and access.

View File

@@ -29,7 +29,7 @@ hide:
``` ```
> 实时同步、无延迟,国内网络环境下推荐使用 > 实时同步、无延迟,国内网络环境下推荐使用
=== ":gitcode: GitCode (镜像仓库)" === ":simple-gitcode: GitCode (镜像仓库)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
@@ -47,7 +47,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh)
``` ```
> 不支持在国内网络环境下使用 > 不建议在国内网络环境下使用
=== ":material-earth: 境外以及海外地区" === ":material-earth: 境外以及海外地区"
@@ -72,7 +72,7 @@ hide:
``` ```
> 实时同步、无延迟,国内网络环境下推荐使用 > 实时同步、无延迟,国内网络环境下推荐使用
=== ":gitcode: GitCode (镜像仓库)" === ":simple-gitcode: GitCode (镜像仓库)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad
@@ -91,7 +91,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad
``` ```
> 不支持在国内网络环境下使用 > 不建议在国内网络环境下使用
=== ":material-library: 中国大陆教育网" === ":material-library: 中国大陆教育网"
@@ -116,7 +116,7 @@ hide:
``` ```
> 实时同步、无延迟,国内网络环境下推荐使用 > 实时同步、无延迟,国内网络环境下推荐使用
=== ":gitcode: GitCode (镜像仓库)" === ":simple-gitcode: GitCode (镜像仓库)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu
@@ -135,7 +135,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu
``` ```
> 不支持在国内网络环境下使用 > 不建议在国内网络环境下使用
@@ -395,7 +395,7 @@ hide:
!!! quote "" !!! quote ""
项目利用 [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) 在每次提交后自动拷贝源码到文档目录作为网站资源发布,网站托管于 :netlify: [Netlify](https://www.netlify.com),几乎没有被劫持的风险请放心使用。 项目利用 [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) 在每次提交后自动拷贝源码到文档目录作为网站资源发布,网站托管于 [:netlify: Netlify](https://www.netlify.com),几乎没有被劫持的风险请放心使用。
当然你也可以使用代码托管仓库的原始地址来调用,这里只是想告诉你为什么会有几个不同的地址,默认的官网地址更易于记忆和访问。 当然你也可以使用代码托管仓库的原始地址来调用,这里只是想告诉你为什么会有几个不同的地址,默认的官网地址更易于记忆和访问。

View File

@@ -35,7 +35,7 @@ hide:
``` ```
> 即時同步、無延遲,中國大陸網路環境下推薦使用 > 即時同步、無延遲,中國大陸網路環境下推薦使用
=== ":gitcode: GitCode (鏡像倉庫)" === ":simple-gitcode: GitCode (鏡像倉庫)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)
@@ -53,7 +53,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh)
``` ```
> 不支援在中國大陸網路環境下使用 > 不建議在中國大陸網路環境下使用
=== ":material-earth: 國際地區" === ":material-earth: 國際地區"
@@ -78,7 +78,7 @@ hide:
``` ```
> 即時同步、無延遲,中國大陸網路環境下推薦使用 > 即時同步、無延遲,中國大陸網路環境下推薦使用
=== ":gitcode: GitCode (鏡像倉庫)" === ":simple-gitcode: GitCode (鏡像倉庫)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --abroad
@@ -97,7 +97,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --abroad
``` ```
> 不支援在中國大陸網路環境下使用 > 不建議在中國大陸網路環境下使用
=== ":material-library: 中國大陸教育網" === ":material-library: 中國大陸教育網"
@@ -122,7 +122,7 @@ hide:
``` ```
> 即時同步、無延遲,中國大陸網路環境下推薦使用 > 即時同步、無延遲,中國大陸網路環境下推薦使用
=== ":gitcode: GitCode (鏡像倉庫)" === ":simple-gitcode: GitCode (鏡像倉庫)"
``` bash ``` bash
bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu bash <(curl -sSL https://raw.gitcode.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) --edu
@@ -141,7 +141,7 @@ hide:
``` bash ``` bash
bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu bash <(curl -sSL https://edgeone.linuxmirrors.cn/main.sh) --edu
``` ```
> 不支援在中國大陸網路環境下使用 > 不建議在中國大陸網路環境下使用
@@ -401,7 +401,7 @@ hide:
!!! quote "" !!! quote ""
項目利用 [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) 在每次提交後自動拷貝原始碼到文檔目錄作為網站資源發佈,網站託管於 :netlify: [Netlify](https://www.netlify.com),幾乎沒有使用風險。 項目利用 [GitHub Action](https://github.com/SuperManito/LinuxMirrors/blob/main/.github/workflows/build-docs.yml#L29) 在每次提交後自動拷貝原始碼到文檔目錄作為網站資源發佈,網站託管於 [:netlify: Netlify](https://www.netlify.com),幾乎沒有使用風險。
當然你也可以使用程式碼託管倉庫的原始位址來調用,這裡只是想告訴你為什麼會有幾個不同的位址,預設的官網位址更容易記憶和訪問。 當然你也可以使用程式碼託管倉庫的原始位址來調用,這裡只是想告訴你為什麼會有幾個不同的位址,預設的官網位址更容易記憶和訪問。

View File

@@ -81,6 +81,7 @@ theme:
- navigation.instant.progress - navigation.instant.progress
- navigation.indexes - navigation.indexes
- navigation.footer - navigation.footer
- navigation.prune
- navigation.tracking - navigation.tracking
- navigation.sections - navigation.sections
- content.tooltips - content.tooltips
@@ -94,15 +95,15 @@ extra:
generator: false generator: false
homepage: https://linuxmirrors.cn homepage: https://linuxmirrors.cn
social: social:
- icon: simple/google
link: https://gitcode.com/SuperManito/LinuxMirrors
name: GitCode
- icon: simple/gitee
link: https://gitee.com/SuperManito/LinuxMirrors
name: Gitee
- icon: simple/github - icon: simple/github
link: https://github.com/SuperManito/LinuxMirrors link: https://github.com/SuperManito/LinuxMirrors
name: GitHub name: GitHub
- icon: simple/gitee
link: https://gitee.com/SuperManito/LinuxMirrors
name: Gitee
- icon: simple/gitcode
link: https://gitcode.com/SuperManito/LinuxMirrors
name: GitCode
analytics: analytics:
provider: google provider: google
property: G-WG7T40F7YP property: G-WG7T40F7YP

View File

@@ -1,4 +1,4 @@
mkdocs-material==9.6.20 mkdocs-material==9.6.21
mkdocs-glightbox==0.5.1 mkdocs-glightbox==0.5.1
mkdocs-exclude-search==0.6.6 mkdocs-exclude-search==0.6.6
# mkdocs-minify-plugin==0.8.0 # mkdocs-minify-plugin==0.8.0