准备材料:
phantomjs
echartsconvert
编写Dockerfile
#Dockerfile
FROM centos:7
MAINTAINER wth
WORKDIR /
RUN mkdir -p echartsconvert && yum install fontconfig freetype bitmap-fonts bitmap-fonts-cjk -y
ADD ./phantomjs phantomjs
ADD ./echartsconvert echartsconvert
EXPOSE 9090
ENTRYPOINT /phantomjs /echartsconvert/echarts-convert.js -s -p 9090
执行docker命名
docker rm -f phantomjs
docker rmi phantomjs-echartsconvert
docker build -t phantomjs-echartsconvert .
docker run -d -p 9090:9090 --network my-net --restart=always --name phantomjs phantomjs-echartsconvert
登录docker hub
···
docker login
···
修改标签 推送
docker images
docker tag ec9fa1998825 514840279/phantomjs-echartsconvert:latest
docker push 514840279/phantomjs-echartsconvert
image.png
点波关注 系统搭建(docker)
网友评论