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 22
|
||||
WORKDIR /home/coder
|
||||
|
||||
COPY . .
|
||||
COPY entrypoint.sh /usr/bin/
|
||||
|
||||
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
|
||||
|
||||
# 安装 code-server
|
||||
RUN echo "安装 code-server" && \
|
||||
export http_proxy=${PROXY} && \
|
||||
export https_proxy=${PROXY} && \
|
||||
apt update && \
|
||||
# apt-get install -y build-essential pkg-config python3 && \
|
||||
apt install -y pkg-config && \
|
||||
npm install --global npm@^8 && \
|
||||
npm config set python python3 && \
|
||||
npm install --global code-server --unsafe-perm
|
||||
# RUN echo "安装 code-server" && \
|
||||
# export http_proxy=${PROXY} && \
|
||||
# export https_proxy=${PROXY} && \
|
||||
# apt update && \
|
||||
# # apt-get install -y build-essential pkg-config python3 && \
|
||||
# apt install -y pkg-config && \
|
||||
# npm install --global npm@^8 && \
|
||||
# npm config set python python3 && \
|
||||
# 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