2 Star 14 Fork 28

archknight/ls-license-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
FROM rust:1.77-bullseye AS builder
ADD sources.list /etc/apt/
RUN apt-get update && apt-get install -y \
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 ./license_server/Cargo.toml ./Cargo.toml
RUN cargo build --release && rm src/*.rs target/release/deps/license_server*
ADD ./license_server/src ./src
RUN cargo build --release
FROM debian:bullseye-slim AS deployer
ADD sources.list /etc/apt/
RUN apt-get update && \
apt-get install -y ca-certificates tzdata && \
rm -rf /var/lib/apt/lists/*
EXPOSE 8080
ENV TZ=Asia/Shanghai \
APP_USER=license_usr
RUN groupadd service && \
useradd -g service $APP_USER && \
mkdir -p /license_service
COPY --from=builder /license_service/target/release/license_server /license_service/license_server
RUN chown -R $APP_USER:service /license_service
USER $APP_USER
WORKDIR /license_service
VOLUME ["/license_service/license.key", "/license_service/license.pem", "/license_service/netfilter.zip", "/license_service/products.json"]
CMD ["./license_server"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/archknight/ls-license-test.git
git@gitee.com:archknight/ls-license-test.git
archknight
ls-license-test
ls-license-test
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385