31 lines
680 B
Docker
31 lines
680 B
Docker
# 表示依赖 alpine 最新版
|
|
FROM debian:12.5
|
|
MAINTAINER Lianglianglee<lll941107@gmail.com>
|
|
ENV VERSION 1.0
|
|
|
|
# 在容器根目录 创建一个 apps 目录
|
|
WORKDIR /apps
|
|
|
|
# 挂载容器目录
|
|
VOLUME ["/apps/config"]
|
|
|
|
# 拷贝当前目录下可以执行文件,配置文件等
|
|
COPY md-view-go /apps/md-view-go
|
|
COPY static /apps/static
|
|
COPY templates /apps/templates
|
|
|
|
RUN chmod a+x /apps/md-view-go
|
|
RUN apt update && apt install curl -y
|
|
# 拷贝配置文件到容器中
|
|
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"] |