md-view-go/Dockerfile

31 lines
663 B
Docker
Raw Normal View History

2023-08-03 13:36:03 +08:00
# 表示依赖 alpine 最新版
2024-05-11 11:06:20 +08:00
FROM debian:12.5
2024-05-10 11:29:41 +08:00
MAINTAINER Lianglianglee<lll941107@gmail.com>
2023-08-03 13:36:03 +08:00
ENV VERSION 1.0
# 在容器根目录 创建一个 apps 目录
WORKDIR /apps
# 挂载容器目录
VOLUME ["/apps/config"]
2024-05-10 11:29:41 +08:00
# 拷贝当前目录下可以执行文件,配置文件等
2023-08-03 13:36:03 +08:00
COPY md-view-go /apps/md-view-go
COPY static /apps/static
COPY templates /apps/templates
RUN chmod a+x /apps/md-view-go
2024-07-24 14:39:21 +08:00
RUN apt install curl
2023-08-03 13:36:03 +08:00
# 拷贝配置文件到容器中
COPY config/application.yaml /apps/config/application.yaml
# 设置时区为上海
RUN echo 'Asia/Shanghai' >/etc/timezone
# 设置编码
ENV LANG C.UTF-8
# 暴露端口
EXPOSE 8081
CMD ["/apps/md-view-go"]