我仍然不完全明白为什么NodeJS安装在我的VM上,而不是安装在Kali docker的基本映像上。。。但无论如何,我还是设法打开了我自己。
rpm
--我发现一个不同的脚本没有它也能工作。然而,新的脚本也需要我安装
gnupg
FROM kalilinux/kali-linux-docker
RUN apt-get update -y && \
apt-get dist-upgrade -y && \
apt-get autoremove -y && \
apt-get clean -y
RUN apt-get -y install curl gnupg
RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install nodejs -y
RUN npm i -g npm
ENV NODE_ENV production
WORKDIR /root/app
COPY . .
RUN npm i
EXPOSE 4000
ENTRYPOINT ["npm", "start"]