File tree Expand file tree Collapse file tree 7 files changed +1189
-45
lines changed
custom-function/rust/fc-custom-rust-event Expand file tree Collapse file tree 7 files changed +1189
-45
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ Type: Application
22Name : fc-custom-rust-event
33Provider :
44 - 阿里云
5- Version : 1.1.3
5+ Version : 1.1.4
66Description : 快速部署一个基于custom runtime 的 RUST Event 类型的 Hello World 到阿里云函数计算
77HomePage : https://github.com/devsapp/start-fc
88Tags :
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ bootstrap/target/
205205
206206# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
207207# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
208- Cargo.lock
208+ # Cargo.lock
209209
210210# These are backup files generated by rustfmt
211211** /* .rs.bk
Original file line number Diff line number Diff line change 1- FROM aliyunfc/runtime-custom:build
2-
3- ENV RUSTUP_HOME=/usr/local/rustup \
4- CARGO_HOME=/usr/local/cargo \
5- PATH=/usr/local/cargo/bin:$PATH \
6- RUST_VERSION=1.45.2
7-
8- RUN set -eux; \
9- echo 'deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib' > /etc/apt/sources.list ; \
10- echo 'deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib' >> /etc/apt/sources.list ; \
11- echo 'deb http://mirrors.aliyun.com/debian-security stretch/updates main' >> /etc/apt/sources.list ; \
12- echo 'deb-src http://mirrors.aliyun.com/debian-security stretch/updates main' >> /etc/apt/sources.list ; \
13- echo 'deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib' >> /etc/apt/sources.list ; \
14- echo 'deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib' >> /etc/apt/sources.list ; \
15- echo 'deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib' >> /etc/apt/sources.list ; \
16- echo 'deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib' >> /etc/apt/sources.list ; \
17- apt-get update; \
18- apt-get install -y --no-install-recommends \
19- ca-certificates \
20- gcc \
21- libc6-dev \
22- wget \
23- ; \
24- curl https://cdn.jsdelivr.net/gh/rust-lang-nursery/rustup.rs/rustup-init.sh > rustup-init ; \
25- chmod +x rustup-init ; \
26- RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup ./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; \
27- rm rustup-init; \
28- chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
29- rustup --version; \
30- cargo --version; \
31- rustc --version; \
32- apt-get remove -y --auto-remove \
33- wget \
34- ; \
35- rm -rf /var/lib/apt/lists/*; \
36-
1+ FROM python:3.7.4-stretch
2+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
3+ RUN echo 'export PATH=$HOME/.cargo/bin:$PATH' >> $HOME/.bashrc
4+ CMD ["bash"]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ build-img:
22 docker build -t fc-rust-env -f Dockerfile.build .
33
44build : build-img
5- docker run --rm -it -v $$(pwd ) :/opt/rust-demo fc-rust-env bash -c " cd /opt/rust-demo/bootstrap && cargo build"
5+ docker run --rm -it -v $$(pwd ) :/opt/rust-demo fc-rust-env bash -c " cd /opt/rust-demo/bootstrap && /root/.cargo/bin/ cargo build"
66 mkdir -p pkg
77 cp bootstrap/target/debug/bootstrap pkg/
88
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments