https://www.cnblogs.com/panwenbin-logs/p/8007348.html
[root@node1 mydocker]#
[root@node1 mydocker]# ls
dockerfile_mqttserver doxygen-1.8.5-3.el7.x86_64.rpm mosquitto-1.4.9.tar.gz paho.mqtt.c.tar.gz
[root@node1 mydocker]#
[root@node1 mydocker]# docker build -f dockerfile_mqttserver -t mqtt_server .
[root@node1 mydocker]#
[root@node1 mydocker]# cat dockerfile_mqttserver
FROM centos
WORKDIR /var/apps/mqtt
ADD ./mosquitto-1.4.9.tar.gz /var/apps/mqtt
ADD ./paho.mqtt.c.tar.gz /var/apps/mqtt
ADD ./doxygen-1.8.5-3.el7.x86_64.rpm /var/apps/mqtt
RUN yum install -y gcc gcc-c++ openssl openssl-devel c-ares-devel libuuid-devel make
#RUN yum install -y doxygen
RUN rpm -ivh /var/apps/mqtt/doxygen-1.8.5-3.el7.x86_64.rpm
RUN cd paho.mqtt.c && make && make html && make install
RUN cd mosquitto-1.4.9 && make && make install
RUN mosquitto -c ./mosquitto.conf -v
CMD /bin/bash
[root@node1 mydocker]#
阅读(598) | 评论(0) | 转发(0) |