logo
0
0
WeChat Login

Images

个人镜像仓库,提供基于 Ubuntu 22.04/24.04 的 Rust + Conda 开发环境镜像。

镜像列表

镜像标签说明
ubuntu-22.04ubuntu-22.04, ubuntu-22.04-rust-condaUbuntu 22.04 + Rust + Miniconda
ubuntu-24.04ubuntu-24.04, ubuntu-24.04-rust-conda, latestUbuntu 24.04 + Rust + Miniconda

预装软件

系统工具

  • git, vim, curl, wget
  • htop, rsync, lsof, jq
  • net-tools, dnsutils, telnet
  • zip, unzip, make, cmake

开发环境

  • Rust: 最新 stable 版本,包含 rust-src、rustfmt、clippy
    • 额外安装: cargo-edit, cargo-watch, cargo-tree
    • 配置中科大镜像加速
  • Miniconda: Python 环境管理
    • 配置清华镜像源
    • 预装基础 Python 3.x

环境变量

  • TZ=Asia/Shanghai - 时区设置
  • LANG=zh_CN.UTF-8 - 中文语言支持
  • PATH 已包含 conda 和 cargo 的二进制路径

使用方法

在 CNB 云原生开发中使用

在你的项目根目录创建 .cnb.yml:

image:
  name: cnb.cool/your-namespace/images:ubuntu-24.04

本地使用

# 拉取镜像
docker pull cnb.cool/your-namespace/images:ubuntu-24.04

# 运行容器
docker run -it --rm cnb.cool/your-namespace/images:ubuntu-24.04 bash

作为基础镜像

FROM cnb.cool/your-namespace/images:ubuntu-24.04

# 安装你的项目依赖
RUN pip install torch numpy pandas
RUN cargo install your-rust-tool

快捷别名

镜像中预置了以下别名:

# 通用
cl      # clear
cdw     # cd /workspace
cdr     # cd /workspace && clear

# Python/Conda
py      # python
py3     # python3
ca      # conda activate
cel     # conda env list

# Rust
cr      # cargo run
cb      # cargo build
ct      # cargo test
cch     # cargo check

构建说明

本仓库使用 CNB 流水线自动构建镜像。支持以下触发方式:

  1. 自动构建: 推送到 mainmaster 分支时自动构建
  2. 手动构建: 在 CNB 仓库页面点击「执行」按钮,选择要构建的镜像

目录结构

.
├── README.md
├── .cnb.yml              # CNB 流水线配置
└── base/
    ├── ubuntu-22.04/
    │   └── Dockerfile
    └── ubuntu-24.04/
        └── Dockerfile

参考

About

No description, topics, or website provided.
Language
Dockerfile93.3%
Shell6.7%