https://github.com/zcyc/mise-dev-env
Multi-language Development Environment Container (Based on mise + Docker)
https://github.com/zcyc/mise-dev-env
Last synced: 4 months ago
JSON representation
Multi-language Development Environment Container (Based on mise + Docker)
- Host: GitHub
- URL: https://github.com/zcyc/mise-dev-env
- Owner: zcyc
- Created: 2025-07-11T07:11:53.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-11T07:25:50.000Z (11 months ago)
- Last Synced: 2025-07-11T10:54:37.886Z (11 months ago)
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-language Development Environment Container (Based on mise + Docker)
## Introduction
This container is based on Ubuntu and integrates [mise](https://github.com/jdx/mise) as a multi-language version management tool. It supports dynamic initialization of development environments for Node.js, Python, Go, etc., via the ENV_LANGS environment variable. All configuration is global (**not in the project directory**), and all shells/consoles can use the development tools directly.
## Usage
### 1. Build the image
```sh
docker build -t dev-env .
```
### 2. Run the container and specify the required language environments
For example: Enable Node.js lts, Python 3.13, and Go 1.24 at the same time
```sh
docker run -it \
-e ENV_LANGS="node@lts python@3.13 go@1.24" \
dev-env
```
### 3. (Recommended) Use Host-side Cache to Speed Up mise
To speed up language installation and avoid repeated downloads, you can mount the host's mise cache directories into the container:
```sh
docker run -it \
-e ENV_LANGS="node@lts python@3.13 go@1.24" \
-v $HOME/.cache/mise:/root/.cache/mise \
-v $HOME/.local/share/mise:/root/.local/share/mise \
mise-dev-env
```
**Important:**
- The cache directories **must be generated on a Linux host** (or from a previous run of this container). Do **not** use cache from macOS, as binaries downloaded on macOS are not compatible with Linux and will cause errors like `Exec format error`.
- The first run on Linux will download all required binaries. Subsequent runs with the same cache will be much faster.
### 4. After entering the container
All development tools are globally available, and you can use them directly in any shell/console:
```sh
node -v
python --version
go version
```
## Notes
- The global mise config file is located at `/etc/mise/mise.toml` and is automatically generated by entrypoint.sh according to ENV_LANGS.
- All development tools are installed globally via mise and are available in all shells.
- You can extend the supported languages in ENV_LANGS as needed.
- **Do not use macOS-generated mise cache in Linux containers!**
---
For more customization or tools, please refer to the [mise official documentation](https://github.com/jdx/mise).