创建dockerfile
FROM alpine:3.12
RUN apk add --no-cache tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
ADD cronsun-v0.3.5-linux-amd64.zip /opt
WORKDIR /opt
RUN unzip cronsun-v0.3.5-linux-amd64.zip \
&& mv cronsun-v0.3.5 cronsun \
&& rm -f cronsun-v0.3.5-linux-amd64.zip
EXPOSE 7079
CMD ["/opt/cronsun/cronweb", "-conf", "/opt/cronsun/conf/base.json"]
etcd启动
sudo docker run -d --name cronsun-etcd-server --restart=always --publish 2379:2379 --publish 2380:2380
--env ALLOW_NONE_AUTHENTICATION=yes --env ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
registry.cn-beijing.aliyuncs.com/qianjia_public/etcd:3.14.4
cronsun-web启动
sudo docker run -d --name cronsun-web --restart=always -v /qj/cronsun-web/conf:/opt/cronsun/conf -p 7079:7079
registry.cn-beijing.aliyuncs.com/qianjia_public/cronsun:v0.3.5