Files
fastbee/docker/Dockerfile.txt
2022-03-20 12:59:49 +08:00

48 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM openjdk:8u322-jre-buster
ENV VERSION 1.1
ENV AUTHOR kerwincui
ENV INFO wumei smart open source living iot platform
# 安装工具和设置时区 apt install curl -y --no-install-recommends && \
RUN apt-get update && \
apt-get install vim -y --no-install-recommends && \
apt-get install wget -y --no-install-recommends && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
#更换国内源
RUN wget http://qiniu.xiwen.online/Debian10.list && \
mv Debian10.list /etc/apt/sources.list && \
apt update && apt upgrade -y
# 安装nginx和redis需要容器内配置nginx和redis
RUN apt-get install nginx -y --no-install-recommends && \
apt-get install redis-server -y --no-install-recommends
# 安装 emqx需要修改密码
RUN apt update && apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common && \
curl -fsSL https://repos.emqx.io/gpg.pub | apt-key add - && \
add-apt-repository \
"deb [arch=amd64] https://repos.emqx.io/emqx-ce/deb/ubuntu/ \
./bionic \
stable" && \
apt update && \
apt install emqx -y --no-install-recommends
# 挂载卷
VOLUME /var/wumei-smart
# 启动脚本
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
# 拷贝前后端压缩文件到容器,容器内解压后删除
COPY ./wumei-smart.tar /var/
RUN cd /var && tar -xvf wumei-smart.tar && rm wumei-smart.tar
# 映射端口
EXPOSE 80 3306 1883 18083