Files
my-dev-server/Dockerfile
2024-01-25 17:56:54 +08:00

37 lines
1.0 KiB
Docker

FROM node
EXPOSE 8080
EXPOSE 22
WORKDIR /app
COPY . .
VOLUME [ "/data" ]
ARG PROXY
ENV https_proxy=${PROXY}
ENV http_proxy=${PROXY}
RUN export http_proxy=$http_proxy \
&& export https_proxy=$https_proxy \
&& apt-get update \
&& apt-get install -y vim \
&& apt-get install -y git \
&& apt-get install -y openssh-server \
&& npm i -g n \
&& npm i -g live-server \
&& touch info.log
RUN rm -f /etc/ssh/ssh_host_rsa_key && \
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' && \
rm -f /etc/ssh/ssh_host_dsa_key && \
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' && \
rm -f /etc/ssh/ssh_host_ecdsa_key && \
ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' && \
rm -f /etc/ssh/ssh_host_ed25519_key && \
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
RUN sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
ENTRYPOINT ["/app/docker-entry-point.sh"]