mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
dockerfiles: add freighter for Rust crates.io
This commit is contained in:
parent
966e4470cc
commit
170f62a787
14
dockerfiles/freighter/Dockerfile
Normal file
14
dockerfiles/freighter/Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM rust:bookworm
|
||||||
|
MAINTAINER Aron Xu <happyaron.xu@gmail.com>
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
git clone --depth=1 https://github.com/open-rust-initiative/freighter; \
|
||||||
|
cd freighter; \
|
||||||
|
cargo build --release; \
|
||||||
|
mkdir -p /root/freighter; \
|
||||||
|
cp /freighter/target/release/freighter /usr/local/bin/
|
||||||
|
|
||||||
|
#COPY dockerfiles/freighter/config.toml /root/freighter/
|
||||||
|
|
||||||
|
WORKDIR /root/freighter
|
||||||
|
CMD /bin/bash
|
159
dockerfiles/freighter/config.toml
Normal file
159
dockerfiles/freighter/config.toml
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
[log]
|
||||||
|
# log format encoder, see https://docs.rs/log4rs/1.2.0/log4rs/append/file/struct.FileAppenderDeserializer.html#configuration
|
||||||
|
# for more information
|
||||||
|
encoder = "{d}:{l} - {m}{n}"
|
||||||
|
|
||||||
|
# log level
|
||||||
|
level = "info"
|
||||||
|
|
||||||
|
# will delete and regenerate log file if exceeded the limit, unit is MB
|
||||||
|
limit = 100
|
||||||
|
|
||||||
|
|
||||||
|
[crates]
|
||||||
|
# download index from domain
|
||||||
|
index_domain = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git"
|
||||||
|
|
||||||
|
# download crates from domain
|
||||||
|
domain = "https://static.crates.io/crates"
|
||||||
|
|
||||||
|
# Number of crates download threads
|
||||||
|
download_threads = 16
|
||||||
|
|
||||||
|
# A list of domains that provide service in order
|
||||||
|
# localhost means read from filesystem
|
||||||
|
# It is better to add s3 domain at the first line
|
||||||
|
serve_domains = [
|
||||||
|
"localhost",
|
||||||
|
# "https://static.crates.io",
|
||||||
|
]
|
||||||
|
|
||||||
|
#(optional) set up a git local path you want to serve
|
||||||
|
#serve_index = "/opt/rust/"
|
||||||
|
|
||||||
|
[rustup]
|
||||||
|
# download rustup from domain
|
||||||
|
domain = "https://static.rust-lang.org"
|
||||||
|
|
||||||
|
# Number of rust toolchain download threads
|
||||||
|
download_threads = 16
|
||||||
|
|
||||||
|
# stable versions that you want to sync with
|
||||||
|
sync_stable_versions = [
|
||||||
|
"1.9",
|
||||||
|
"1.10",
|
||||||
|
"1.11",
|
||||||
|
"1.12",
|
||||||
|
"1.12.1",
|
||||||
|
"1.13",
|
||||||
|
"1.14",
|
||||||
|
"1.15",
|
||||||
|
"1.15.1",
|
||||||
|
"1.16",
|
||||||
|
"1.17",
|
||||||
|
"1.18",
|
||||||
|
"1.19",
|
||||||
|
"1.20",
|
||||||
|
"1.21",
|
||||||
|
"1.22",
|
||||||
|
"1.22.1",
|
||||||
|
"1.23",
|
||||||
|
"1.24",
|
||||||
|
"1.24.1",
|
||||||
|
"1.25",
|
||||||
|
"1.26",
|
||||||
|
"1.26.1",
|
||||||
|
"1.26.2",
|
||||||
|
"1.27",
|
||||||
|
"1.27.1",
|
||||||
|
"1.27.2",
|
||||||
|
"1.28",
|
||||||
|
"1.29",
|
||||||
|
"1.29.1",
|
||||||
|
"1.29.2",
|
||||||
|
"1.30",
|
||||||
|
"1.30.1",
|
||||||
|
"1.31",
|
||||||
|
"1.31.1",
|
||||||
|
"1.32",
|
||||||
|
"1.33",
|
||||||
|
"1.34",
|
||||||
|
"1.34.1",
|
||||||
|
"1.34.2",
|
||||||
|
"1.35",
|
||||||
|
"1.36",
|
||||||
|
"1.37",
|
||||||
|
"1.38",
|
||||||
|
"1.39",
|
||||||
|
"1.40",
|
||||||
|
"1.41",
|
||||||
|
"1.41.1",
|
||||||
|
"1.42",
|
||||||
|
"1.43",
|
||||||
|
"1.43.1",
|
||||||
|
"1.44",
|
||||||
|
"1.44.1",
|
||||||
|
"1.45",
|
||||||
|
"1.45.1",
|
||||||
|
"1.45.2",
|
||||||
|
"1.46",
|
||||||
|
"1.47",
|
||||||
|
"1.48",
|
||||||
|
"1.49",
|
||||||
|
"1.50",
|
||||||
|
"1.51",
|
||||||
|
"1.52",
|
||||||
|
"1.52.1",
|
||||||
|
"1.53",
|
||||||
|
"1.54",
|
||||||
|
"1.55",
|
||||||
|
"1.56",
|
||||||
|
"1.56.1",
|
||||||
|
"1.57",
|
||||||
|
"1.58",
|
||||||
|
"1.58.1",
|
||||||
|
"1.59",
|
||||||
|
"1.60",
|
||||||
|
"1.61",
|
||||||
|
"1.62",
|
||||||
|
"1.62.1",
|
||||||
|
"1.63",
|
||||||
|
"1.64",
|
||||||
|
"1.65",
|
||||||
|
"1.66",
|
||||||
|
"1.66.1",
|
||||||
|
"1.67",
|
||||||
|
"1.67.1",
|
||||||
|
"1.68",
|
||||||
|
"1.68.1",
|
||||||
|
"1.68.2",
|
||||||
|
"1.69",
|
||||||
|
"1.70"
|
||||||
|
]
|
||||||
|
|
||||||
|
# days you want to keep for historical nightly version
|
||||||
|
sync_nightly_days = 30
|
||||||
|
|
||||||
|
# days you want to keep for historical beta version
|
||||||
|
sync_beta_days = 30
|
||||||
|
|
||||||
|
# A list of domains that provide service in order
|
||||||
|
# localhost means read from filesystem
|
||||||
|
serve_domains = [
|
||||||
|
"localhost",
|
||||||
|
# "https://static.rust-lang.org",
|
||||||
|
]
|
||||||
|
|
||||||
|
# (optional) set this value to sync historical nightly and beta version
|
||||||
|
history_version_start_date = "2016-03-01"
|
||||||
|
|
||||||
|
|
||||||
|
[proxy]
|
||||||
|
# use true flag to enable proxy
|
||||||
|
enable = false
|
||||||
|
|
||||||
|
# used for git index proxy
|
||||||
|
git_index_proxy = "http://127.0.0.1:6780"
|
||||||
|
|
||||||
|
# used for crates and toolchain download proxy
|
||||||
|
download_proxy = "http://127.0.0.1:6780"
|
Loading…
x
Reference in New Issue
Block a user