Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions dockerfile-kasm-trae-ai
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-ubuntu-jammy"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root

ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME

######### Customize Container Here ###########

# Install Google Chrome
COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/
RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/

# Install Trae AI
COPY ./src/ubuntu/install/trae_ai $INST_SCRIPTS/trae_ai/
RUN bash $INST_SCRIPTS/trae_ai/install_trae_ai.sh && rm -rf $INST_SCRIPTS/trae_ai/

COPY ./src/ubuntu/install/trae_ai/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh

COPY ./src/ubuntu/install/trae_ai/vnc_startup.sh /dockerstartup/vnc_startup.sh
RUN chmod 755 /dockerstartup/vnc_startup.sh

COPY ./src/ubuntu/install/trae_ai/ui-BKiQa3b8.js /usr/share/kasmvnc/www/assets/ui-BKiQa3b8.js

RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/backgrounds/bg_kasm.png /usr/share/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel

######### End Customizations ###########

RUN chown 1000:0 $HOME

ENV TRAE_WORKDIR ""
ENV KASM_USER kasm-user
ENV HOME /home/kasm-user


ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
ENV TZ=UTC
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME

USER 1000
50 changes: 50 additions & 0 deletions dockerfile-kasm-trae-cn
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
ARG BASE_TAG="develop"
ARG BASE_IMAGE="core-ubuntu-jammy"
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
USER root

ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME

######### Customize Container Here ###########

# Install Google Chrome
COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/
RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/

# Install Trae CN
COPY ./src/ubuntu/install/trae_cn $INST_SCRIPTS/trae_cn/
RUN bash $INST_SCRIPTS/trae_cn/install_trae_cn.sh && rm -rf $INST_SCRIPTS/trae_cn/

COPY ./src/ubuntu/install/trae_cn/custom_startup.sh $STARTUPDIR/custom_startup.sh
RUN chmod 755 $STARTUPDIR/custom_startup.sh

COPY ./src/ubuntu/install/trae_cn/vnc_startup.sh /dockerstartup/vnc_startup.sh
RUN chmod 755 /dockerstartup/vnc_startup.sh

COPY ./src/ubuntu/install/trae_cn/ui-BKiQa3b8.js /usr/share/kasmvnc/www/assets/ui-BKiQa3b8.js

# Update the desktop environment to be optimized for a single application
RUN cp $HOME/.config/xfce4/xfconf/single-application-xfce-perchannel-xml/* $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/
RUN cp /usr/share/backgrounds/bg_kasm.png /usr/share/backgrounds/bg_default.png
RUN apt-get remove -y xfce4-panel

######### End Customizations ###########

RUN chown 1000:0 $HOME

ENV TRAE_WORKDIR ""
ENV KASM_USER kasm-user
ENV HOME /home/kasm-user

# Default language and timezone settings
ENV LC_ALL=zh_CN.UTF-8
ENV LANG=zh_CN.UTF-8
ENV LANGUAGE=zh_CN.UTF-8
ENV TZ=Asia/Shanghai
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME

USER 1000
51 changes: 51 additions & 0 deletions docs/trae-ai/README-ZH_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# About This Image

This Image contains a browser-accessible version of [TRAE IDE AI](https://www.trae.ai).

这个镜像在Kasm镜像基础上安装了 TRAE IDE AI 的 .deb(x64) 版本。

# 功能改进

- 默认设置 `enable_ime`,开启本地输入法

# How to Use

- 启动容器

```bash
docker run -dit --name trae \
--user root \
-e KASM_USER=admin \
-e VNC_PW=Password123 \
-e TRAE_WORKDIR=/trae \
-v ./trae:/trae \
--shm-size 1g \
-p 36902:6901 \
kasmweb/trae-ai:2.3.29372
```

- 使用compose

```yaml
version: '3.8'
services:
trae:
image: kasmweb/trae-ai:2.3.29372
container_name: trae
user: root
environment:
- KASM_USER=admin
- VNC_PW=Password123
- TRAE_WORKDIR=/trae
volumes:
- ./trae:/trae
shm_size: 1g
ports:
- "36902:6901"
restart: unless-stopped
```

在配置中:

1. `KASM_USER` 和 `VNC_PW` 是浏览器访问的用户名和密码
2. `TRAE_WORKDIR` 是TRAE的工作目录,需要与挂载卷的路径一致,TRAE启动后会默认打开`$TRAE_WORKDIR/workspace`目录,同时保存配置和扩展到`$TRAE_WORKDIR`目录下
49 changes: 49 additions & 0 deletions docs/trae-ai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# About This Image

This Image contains a browser-accessible version of [TRAE IDE AI](https://www.trae.ai).

# Feature Improvements

- Default setting `enable_ime` to enable local input method

# How to Use

- Start Container

```bash
docker run -dit --name trae \
--user root \
-e KASM_USER=admin \
-e VNC_PW=Password123 \
-e TRAE_WORKDIR=/trae \
-v ./trae:/trae \
--shm-size 1g \
-p 36902:6901 \
kasmweb/trae-ai:2.3.29372
```

- Use Compose

```yaml
version: '3.8'
services:
trae:
image: kasmweb/trae-ai:2.3.29372
container_name: trae
user: root
environment:
- KASM_USER=admin
- VNC_PW=Password123
- TRAE_WORKDIR=/trae
volumes:
- ./trae:/trae
shm_size: 1g
ports:
- "36902:6901"
restart: unless-stopped
```

In the configuration:

1. `KASM_USER` and `VNC_PW` are the username and password for browser access
2. `TRAE_WORKDIR` is the working directory for TRAE, which needs to match the mounted volume path. After TRAE starts, it will automatically open the `$TRAE_WORKDIR/workspace` directory, and save configurations and extensions to the `$TRAE_WORKDIR` directory
51 changes: 51 additions & 0 deletions docs/trae-cn/README-ZH_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# About This Image

This Image contains a browser-accessible version of [TRAE IDE CN](https://www.trae.cn).

这个镜像在Kasm镜像基础上安装了 TRAE IDE CN 的 .deb(x64) 版本。

# 功能改进

- 默认设置 `enable_ime`,开启本地输入法

# How to Use

- 启动容器

```bash
docker run -dit --name trae \
--user root \
-e KASM_USER=admin \
-e VNC_PW=Password123 \
-e TRAE_WORKDIR=/trae \
-v ./trae:/trae \
--shm-size 1g \
-p 36901:6901 \
kasmweb/trae-cn:2.3.27641
```

- 使用compose

```yaml
version: '3.8'
services:
trae:
image: kasmweb/trae-cn:2.3.27641
container_name: trae
user: root
environment:
- KASM_USER=admin
- VNC_PW=Password123
- TRAE_WORKDIR=/trae
volumes:
- ./trae:/trae
shm_size: 1g
ports:
- "36901:6901"
restart: unless-stopped
```

在配置中:

1. `KASM_USER` 和 `VNC_PW` 是浏览器访问的用户名和密码
2. `TRAE_WORKDIR` 是TRAE的工作目录,需要与挂载卷的路径一致,TRAE启动后会默认打开`$TRAE_WORKDIR/workspace`目录,同时保存配置和扩展到`$TRAE_WORKDIR`目录下
49 changes: 49 additions & 0 deletions docs/trae-cn/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# About This Image

This Image contains a browser-accessible version of [TRAE IDE CN](https://www.trae.cn).

# Feature Improvements

- Default setting `enable_ime` to enable local input method

# How to Use

- Start Container

```bash
docker run -dit --name trae \
--user root \
-e KASM_USER=admin \
-e VNC_PW=Password123 \
-e TRAE_WORKDIR=/trae \
-v ./trae:/trae \
--shm-size 1g \
-p 36901:6901 \
kasmweb/trae-cn:2.3.27641
```

- Use Compose

```yaml
version: '3.8'
services:
trae:
image: kasmweb/trae-cn:2.3.27641
container_name: trae
user: root
environment:
- KASM_USER=admin
- VNC_PW=Password123
- TRAE_WORKDIR=/trae
volumes:
- ./trae:/trae
shm_size: 1g
ports:
- "36901:6901"
restart: unless-stopped
```

In the configuration:

1. `KASM_USER` and `VNC_PW` are the username and password for browser access
2. `TRAE_WORKDIR` is the working directory for TRAE, which needs to match the mounted volume path. After TRAE starts, it will automatically open the `$TRAE_WORKDIR/workspace` directory, and save configurations and extensions to the `$TRAE_WORKDIR` directory
Loading