!99 add devcontainer feature
* VSCode一类IDE的DevStar插件相关的功能或地址的命名以vscode为前缀替代原来的devstar前缀,命名上的指向性更明确 * add devcontainer feature
This commit is contained in:
repo.diff.committed_by
孟宁
repo.diff.parent
e394f631a6
repo.diff.commit
95db97af94
@@ -73,7 +73,7 @@ RUN chown git:git /var/lib/gitea /etc/gitea
|
||||
COPY --from=build-env /tmp/local /
|
||||
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
|
||||
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
|
||||
|
||||
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/webTerminal.sh /app/gitea/webTerminal.sh
|
||||
# git:git
|
||||
USER 1000:1000
|
||||
ENV GITEA_WORK_DIR=/var/lib/gitea
|
||||
|
||||
40
docker/Dockerfile.webTerminal
Normal file
40
docker/Dockerfile.webTerminal
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM docker.io/library/ubuntu:24.04 AS build-env
|
||||
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
git \
|
||||
build-essential \
|
||||
cmake \
|
||||
libjson-c-dev \
|
||||
libwebsockets-dev
|
||||
|
||||
RUN git clone https://devstar.cn/devstar/webTerminal.git /home/webTerminal
|
||||
# 设置工作目录并构建
|
||||
WORKDIR /home/webTerminal/build
|
||||
RUN cmake ..
|
||||
RUN make && make install
|
||||
|
||||
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# 从构建阶段复制编译好的程序
|
||||
COPY --from=build-env /home/webTerminal/build/ttyd /home/webTerminal/build/ttyd
|
||||
|
||||
# 只安装运行时需要的库
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
curl && \
|
||||
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
|
||||
apt-get install -y tini \
|
||||
libjson-c-dev \
|
||||
libwebsockets-dev && \
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||
apt-get update && apt-get install -y docker-ce-cli && \
|
||||
apt remove --purge curl -y && apt autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
CMD ["/home/webTerminal/build/ttyd", "-W", "bash"]
|
||||
Reference in New Issue
Block a user