feat(build):完成Docker镜像的编译配置和构建。
This commit is contained in:
		| @@ -1,20 +1,20 @@ | ||||
| FROM rust:1.69-slim-bullseye AS builder | ||||
| FROM rust:1.77-bullseye AS builder | ||||
| 
 | ||||
| ADD sources.list /etc/apt/ | ||||
| RUN apt-get update && apt-get install -y \ | ||||
|   rpcsvc-proto \ | ||||
|   libc6-dev \ | ||||
|   libclang-dev \ | ||||
|   pkg-config \ | ||||
|   libssl-dev | ||||
| ADD crates.conf /root/.cargo/config | ||||
| RUN USER=root cargo new --bin license_service | ||||
| ADD ./cert_lib /cert_lib | ||||
| WORKDIR /license_service | ||||
| COPY ./Cargo.toml ./Cargo.toml | ||||
| COPY ./license_server/Cargo.toml ./Cargo.toml | ||||
| 
 | ||||
| RUN cargo build --release && rm src/*.rs target/release/deps/license_server* | ||||
| 
 | ||||
| ADD ./src ./src | ||||
| ADD ./license_server/src ./src | ||||
| 
 | ||||
| RUN cargo build --release | ||||
| 
 | ||||
| @@ -37,7 +37,7 @@ RUN groupadd service && \ | ||||
| 
 | ||||
| COPY --from=builder /license_service/target/release/license_server /license_service/license_server | ||||
| 
 | ||||
| RUN chown -R $APP_USER:service license_server | ||||
| RUN chown -R $APP_USER:service /license_service | ||||
| 
 | ||||
| USER $APP_USER | ||||
| WORKDIR /license_service | ||||
| @@ -1,4 +1,3 @@ | ||||
| #![feature(diagnostic_namespace)] | ||||
| #![allow(dead_code)] | ||||
|  | ||||
| use tracing::{error, info}; | ||||
|   | ||||
| @@ -12,12 +12,4 @@ deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib | ||||
| 
 | ||||
| #deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib | ||||
| 
 | ||||
| #deb http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib | ||||
| 
 | ||||
| #deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib | ||||
| 
 | ||||
| #deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib | ||||
| 
 | ||||
| deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib | ||||
| 
 | ||||
| deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contri | ||||
		Reference in New Issue
	
	Block a user