ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` MAINTAINER bibibetter #####mongodb#### RUN apt-get update RUN apt-get -qq -y install curl RUN apt-get -y install gnupg RUN apt-get -y install wget RUN mkdir -p /data/db \ && mkdir -p /log/mongodb RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc|apt-key add - RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list RUN apt-get update RUN apt-get install -y mongodb-org ####nginx#### RUN apt-get update RUN apt-get install -y gcc RUN apt-get install -y libpcre3 libpcre3-dev RUN apt-get install -y zlib1g zlib1g-dev RUN apt-get install -y openssl RUN apt-get install -y libssl-dev RUN apt update && apt install -y make WORKDIR /usr/local RUN mkdir nginx WORKDIR /usr/local/nginx RUN wget http://nginx.org/download/nginx-1.18.0.tar.gz RUN tar -xvf nginx-1.18.0.tar.gz WORKDIR /usr/local/nginx/nginx-1.18.0 RUN ./configure RUN make install ####bbbmarkservices#### ADD EmbedderCLI /www/bbbmarkservices/EmbedderCLI/ ADD demo /www/bbbmarkservices/EmbedderCLI/demo/ ADD lib /usr/lib ADD res /www/bbbmarkservices/EmbedderCLI/ ADD bbbmarkservices /www/bbbmarkservices/ RUN apt-get -y install lrzsz RUN apt-get -y install lsof RUN apt-get -y install vim RUN echo "export LANG="zh_CN.UTF-8"" >> /etc/profile RUN /bin/bash -c "source /etc/profile" RUN echo "source /etc/profile" >> ~/.bashrc ADD sh /www/bbbmarkservices/sh/ ####supervisor### RUN apt-get install -y supervisor # Installing supervisord ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf ####CMD && etc##### COPY conf/nginx.conf /usr/local/nginx/conf/nginx.conf ADD dist /usr/local/nginx/dist/ VOLUME /data/db EXPOSE 27017 80 9090 22 WORKDIR /www/bbbmarkservices/sh RUN chmod +x ./docker-entrypoint.sh WORKDIR /www/bbbmarkservices ENTRYPOINT ["/bin/bash","-c","/www/bbbmarkservices/sh/docker-entrypoint.sh"] ##ENTRYPOINT ["/usr/bin/supervisord"] ``` ### RUN、CMD与ENTRYPOINT RUN是在build中执行完毕; CMD与ENTRYPOINT是在docker run命令执行时候执行。一份Dockfile文件,在执行docker run命令时,只有无论有多少个CMD或ENTRYPOINT,只会有最后一个CMD或ENTRYPOINT命令被执行,前面的都会忽略(ENTRYPOINT等同于CMD进行处理,比如第一个是ENTRYPOINT,第二个是CMD,只会第二个CMD会被执行)。因此,一份Dockfile文件,只能写一个CMD命令或ENTRYPOINT。