• nodejs dockerfile


    nodesjs 基础镜像

    FROM centos:centos7.9.2009
    
    MAINTAINER fengjian <fengjian1585@163.com>
    
    ENV TZ "Asia/Shanghai"
    ENV TERM xterm
    ENV NODE_HOME=/usr/local/node
    ENV PATH $PATH:$NODE_HOME/bin
    
    ENV TimeZone=Asia/Shanghai
    RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
    
    ADD node.tar.gz /usr/local/
    
    RUN rm /etc/yum.repos.d/* -rf
    ADD Centos-7.repo /etc/yum.repos.d/
    ADD epel.repo /etc/yum.repos.d/
    RUN yum clean all
    RUN yum -y install net-tools bind-utils sysstat telnet 
    ADD profile /etc
    ADD 20-nproc.conf /etc/security/limits.d/
    ADD limits.conf /etc/security/
    RUN mkdir -p /data/webserver && \
        rm /var/cache/* -rf && \
        source /etc/profile && \
        npm install forever -g && \
        npm install -g express-generator && \
        npm install -g express && \
        npm install -g mysql && \
        npm install -g body-parser

    启动服务镜像

    [root@172-16-6-22 bigdata-bj-prod-api-nodejs]# cat Dockerfile 
    FROM 172.22.128.224/source/nodejs12.18.2
    
    MAINTAINER fengjian <fengjian1585@163.com>
    
    COPY serve /data/webserver/serve
    
    WORKDIR  /data/webserver/serve
    
    RUN ln -s /usr/local/node/lib/node_modules /data/webserver/serve/
    
    EXPOSE 80
    
    CMD forever -c node  index.js
  • 相关阅读:
    功能强大的T4文本模版
    C#中.snk文件的作用
    ASP.NET MVC中实现多个按钮提交的几种方法
    asp.net mvc强大的分页控件MvcPager
    设计模式—观察者模式
    Http响应码

    编码习惯
    vim 快捷键 转
    makefilevvhttp://www.tudou.com/programs/view/e3Z8RbxFIZE/
  • 原文地址:https://www.cnblogs.com/fengjian2016/p/15926458.html
Copyright © 2020-2023  润新知