更新 Dockerfile
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
mol
2024-02-24 08:02:06 +00:00
parent 873517ab19
commit dd93ea4363

View File

@ -3,14 +3,13 @@ FROM codercom/code-server
EXPOSE 8080 EXPOSE 8080
EXPOSE 22 EXPOSE 22
USER coder USER root
WORKDIR /home/coder WORKDIR /home/coder
VOLUME [ "/home/coder/project", "/home/coder/.ssh", "/home/coder/.local", "/home/coder/.config" ] VOLUME [ "/home/coder/project", "/home/coder/.ssh", "/home/coder/.local", "/home/coder/.config" ]
COPY entrypoint.sh /usr/bin/ COPY entrypoint.sh /usr/bin/
USER root
ENV ENTRYPOINTD=/entrypoint.d ENV ENTRYPOINTD=/entrypoint.d
# 运行时可以添加代理 # 运行时可以添加代理
@ -39,11 +38,7 @@ RUN echo "安装基础工具与配置文件" && \
mkdir /tmp/log && \ mkdir /tmp/log && \
touch /tmp/log/info.log && \ touch /tmp/log/info.log && \
chmod 777 /tmp/log/info.log && \ chmod 777 /tmp/log/info.log && \
chmod 777 /usr/bin/entrypoint.sh && \ chmod 777 /usr/bin/entrypoint.sh
chown -R coder:coder /home/coder/project && \
chown -R coder:coder /home/coder/.ssh && \
chown -R coder:coder /home/coder/.local && \
chown -R coder:coder /home/coder/.config
# 安装 node 环境 # 安装 node 环境
RUN echo "安装 node 环境" && \ RUN echo "安装 node 环境" && \
@ -103,7 +98,6 @@ RUN echo "配置 ssh" && \
# npm install --global npm@^8 && \ # npm install --global npm@^8 && \
# npm config set python python3 && \ # npm config set python python3 && \
# npm install --global code-server --unsafe-perm # npm install --global code-server --unsafe-perm
USER coder
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."] ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]