DockerNodeJS-Build

不管现实多么惨不忍睹,都要持之以恒地相信,这只是黎明前短暂的黑暗而已。不要惶恐眼前的难关迈不过去,不要担心此刻的付出没有回报,别再花时间等待天降好运。真诚做人,努力做事!你想要的,岁月都会给你。DockerNodeJS-Build,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

Node v12.22.3

root@NodeTest:/app# npm config set registry https://registry.npm.taobao.org
root@NodeTest:/app# npm config get registry
https://registry.npm.taobao.org/
root@NodeTest:/app# npm install webpack -g
/usr/local/bin/webpack -> /usr/local/lib/node_modules/webpack/bin/webpack.js
+ webpack@5.44.0
added 73 packages from 120 contributors in 5.371s
root@NodeTest:/app# npm install

image.pngimage.pngimage.png

Node v15.5.1

image.png

image.png

docker run -itd -p 8002:80 --name NodeTest -h NodeTest -v /root/docker/003.NodeJS:/app node:12

docker run -itd -p 8002:80 --name NodeTest -h NodeTest  nodejs-12-test:12
FROM node:12

RUN echo 'deb http://mirrors.163.com/debian/ buster main non-free contrib\\r\\ndeb http://mirrors.163.com/debian/ buster-updates main non-free contrib\\r\\ndeb http://mirrors.163.com/debian/ buster-backports main non-free contrib\\r\\ndeb-src http://mirrors.163.com/debian/ buster main non-free contrib\\r\\ndeb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib\\r\\ndeb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib\\r\\ndeb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib\\r\\ndeb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib\\r\\n' > /etc/apt/sources.list
###安装视频转码组件FFmpeg###
RUN apt-get update -y && \
	apt-get upgrade -y && \
	apt install ffmpeg -y

WORKDIR /app

# Bundle app source
COPY . /app
RUN npm config set registry https://registry.npm.taobao.org
# 检查配置是否成功 npm config get registry
RUN npm install webpack -g
RUN npm install

EXPOSE 80
CMD [ "npm", "start" ]

给的程序一直报错,暂未解决。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/160403.html

(0)
飞熊的头像飞熊bm

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!