Dockerfile
FROM java:8
ADD emqx-http-auth-api-0.0.1-SNAPSHOT.jar app.jar
EXPOSE 8888
ENTRYPOINT ["java","-jar","/app.jar"]
构建镜像
docker build -t emqx-http-auth-api .
创建自动启动容器
docker run --restart=always -d --name emqx-http-auth-api -p 8888:8888 emqx-http-auth-api
来源:oschina
链接:https://my.oschina.net/dtz/blog/4927750