2024-12-18 03:24:16 +00:00
2025-03-05 06:12:29 +00:00
# Multi-Language Compile Environment / 多语言编译环境
2025-01-01 00:58:45 +00:00
2025-03-05 06:02:34 +00:00
[English Version ](#english-version ) | [中文版本 ](#中文版本 )
2025-01-01 00:58:45 +00:00
2025-03-05 06:02:34 +00:00
---
2025-01-01 00:58:45 +00:00
2025-03-05 06:02:34 +00:00
## English Version
< a id = "english-version" > < / a >
2025-01-01 00:58:45 +00:00
2025-03-05 06:02:34 +00:00
### Overview
2025-03-05 06:12:29 +00:00
This project provides a Docker-based multi-language compile environment. It is designed to support development in various programming languages such as C/C++, Java, Python, Node.js, Go, Rust, Ruby, PHP, Haskell, Perl, Lua, and .NET.
2025-03-05 06:02:34 +00:00
### Prerequisites
2025-03-05 06:12:29 +00:00
- Docker (with Buildx support if needed)
- Internet access to download dependencies
2025-03-05 06:02:34 +00:00
### Build Instructions
2025-03-05 06:12:29 +00:00
1. **Build the Docker image:**
Execute the following command in the project directory:
2025-03-05 06:02:34 +00:00
```bash
2025-03-05 06:12:29 +00:00
docker build -t multi-lang .
2025-03-05 06:02:34 +00:00
```
2025-03-05 06:12:29 +00:00
2. **Run the container:**
Start a container with:
2025-03-05 06:02:34 +00:00
```bash
2025-03-05 06:12:29 +00:00
docker run -it --rm multi-lang
2025-03-05 06:02:34 +00:00
```
### Usage
2025-03-05 06:12:29 +00:00
Once inside the container, you can use the pre-installed compilers and tools to compile and run your projects. The working directory is set to `/workspace` .
2025-03-05 06:02:34 +00:00
---
[中文版本 ](#中文版本 )
---
## 中文版本
< a id = "中文版本" > < / a >
### 概述
2025-03-05 06:12:29 +00:00
该项目构建了一个基于 Docker 的多语言编译环境,支持 C/C++、Java、Python、Node.js、Go、Rust、Ruby、PHP、Haskell、Perl、Lua 以及 .NET 等多种语言的开发和编译。
2025-03-05 06:02:34 +00:00
### 前提条件
2025-03-05 06:12:29 +00:00
- 安装 Docker( 如果需要可支持 Buildx)
- 具备下载依赖的网络环境
2025-03-05 06:02:34 +00:00
2025-03-05 06:12:29 +00:00
### 构建步骤
1. **构建 Docker 镜像:**
在项目目录下执行:
2025-03-05 06:02:34 +00:00
```bash
2025-03-05 06:12:29 +00:00
docker build -t multi-lang .
2025-03-05 06:02:34 +00:00
```
2025-03-05 06:12:29 +00:00
2. **运行容器:**
使用以下命令启动容器:
2025-03-05 06:02:34 +00:00
```bash
2025-03-05 06:12:29 +00:00
docker run -it --rm multi-lang
2025-03-05 06:02:34 +00:00
```
### 使用方法
2025-03-05 06:12:29 +00:00
进入容器后,所有的编译器与工具已经预先安装好,工作目录为 `/workspace` ,可以直接在此目录下进行项目的开发和编译。
2025-03-05 06:02:34 +00:00
---
[English Version ](#english-version )
2025-03-05 06:12:29 +00:00
```