This commit is contained in:
24
Dockerfile
24
Dockerfile
@ -1,9 +1,9 @@
|
|||||||
FROM ubuntu
|
FROM lscr.io/linuxserver/code-server:latest
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
WORKDIR /home/coder
|
WORKDIR /home/coder
|
||||||
|
|
||||||
COPY . .
|
COPY entrypoint.sh /usr/bin/
|
||||||
|
|
||||||
VOLUME [ "/home/coder/project", "/root/.ssh", "/root/.local", "/root/.config" ]
|
VOLUME [ "/home/coder/project", "/root/.ssh", "/root/.local", "/root/.config" ]
|
||||||
|
|
||||||
@ -78,16 +78,16 @@ RUN echo "配置 ssh" && \
|
|||||||
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
|
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
|
||||||
|
|
||||||
# 安装 code-server
|
# 安装 code-server
|
||||||
RUN echo "安装 code-server" && \
|
# RUN echo "安装 code-server" && \
|
||||||
export http_proxy=${PROXY} && \
|
# export http_proxy=${PROXY} && \
|
||||||
export https_proxy=${PROXY} && \
|
# export https_proxy=${PROXY} && \
|
||||||
apt update && \
|
# apt update && \
|
||||||
# apt-get install -y build-essential pkg-config python3 && \
|
# # apt-get install -y build-essential pkg-config python3 && \
|
||||||
apt install -y pkg-config && \
|
# apt install -y pkg-config && \
|
||||||
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
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["/home/coder/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user