File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 36
36
- [ rclone] ( #rclone )
37
37
- [ rsync] ( #rsync )
38
38
- [ rubygems] ( #rubygems )
39
+ - [ rustup] ( #rustup )
39
40
- [ stackage] ( #stackage )
40
41
- [ tsumugu] ( #tsumugu )
41
42
- [ winget-source] ( #winget-source )
@@ -430,6 +431,21 @@ ref:
430
431
| ---------- | ---------------------------------- |
431
432
| ` UPSTREAM ` | Defaults to ` http://rubygems.org ` . |
432
433
434
+ ### rustup
435
+
436
+ [ ![ rustup] ( https://img.shields.io/docker/image-size/ustcmirror/rustup/latest )] ( https://hub.docker.com/r/ustcmirror/rustup " rustup ")
437
+ [ ![ rustup] ( https://img.shields.io/docker/pulls/ustcmirror/rustup/latest )] ( https://hub.docker.com/r/ustcmirror/rustup " rustup ")
438
+
439
+ This image is based on [ rustup-mirror] ( https://github.com/jiegec/rustup-mirror ) .
440
+
441
+ | Parameter | Description |
442
+ | ---------- | ------------------------------------------- |
443
+ | ` UPSTREAM ` | Defaults to ` https://static.rust-lang.org/ ` |
444
+ | ` GC ` | Defaults to ` 1 ` |
445
+ | ` TARGETS ` | Defaults to ` x86_64-unknown-linux-gnu ` |
446
+ | ` URL ` | Defaults to ` http://127.0.0.1:8000/ ` |
447
+
448
+
433
449
### shadowmire
434
450
435
451
[ ![ shadowmire] ( https://img.shields.io/docker/image-size/ustcmirror/shadowmire/latest )] ( https://hub.docker.com/r/ustcmirror/shadowmire " shadowmire ")
Original file line number Diff line number Diff line change
1
+ FROM rust:latest AS builder
2
+
3
+ RUN apt update \
4
+ && apt install -y --no-install-recommends git
5
+
6
+ RUN git clone https://github.com/jiegec/rustup-mirror app && \
7
+ cd app && \
8
+ git checkout v0.9.0
9
+
10
+ WORKDIR /app
11
+
12
+ ARG CARGO_BUILD_EXTRA=" "
13
+ RUN cargo build --release ${CARGO_BUILD_EXTRA}
14
+
15
+ FROM ustcmirror/base:debian
16
+ LABEL maintainer=
"Erina Init <[email protected] >"
17
+
18
+ COPY --from=builder /app/target/release/rustup-mirror /usr/local/bin
19
+
20
+ RUN apt update \
21
+ && apt install -y \
22
+ ca-certificates \
23
+ libssl3
24
+
25
+ ADD sync.sh /
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eu
4
+ [[ $DEBUG = true ]] && set -x
5
+
6
+ echo " Running script"
7
+
8
+ export UPSTREAM=" ${UPSTREAM:- https:// static.rust-lang.org/ } "
9
+ export GC=" ${GC:- 1} "
10
+ export TARGETS=" ${TARGETS:- x86_64-unknown-linux-gnu} "
11
+ export URL=" ${URL:- http:// 127.0.0.1: 8000.} "
12
+
13
+ exec rustup-mirror --upstream-url " $UPSTREAM " \
14
+ --targets " $TARGETS " \
15
+ --gc " $GC " \
16
+ --url " $URL " \
17
+ --mirror " $TO "
You can’t perform that action at this time.
0 commit comments