docker file

This commit is contained in:
lianglianglee 2023-08-03 13:36:03 +08:00
parent c651e224e8
commit c1a052b8c9
1 changed files with 30 additions and 0 deletions

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
# 表示依赖 alpine 最新版
FROM debian:latest
MAINTAINER Wang Chen Chen<932560435@qq.com>
ENV VERSION 1.0
# 在容器根目录 创建一个 apps 目录
WORKDIR /apps
# 挂载容器目录
VOLUME ["/apps/config"]
# 拷贝当前目录下 go_docker_demo1 可以执行文件
COPY md-view-go /apps/md-view-go
COPY static /apps/static
COPY templates /apps/templates
RUN chmod a+x /apps/md-view-go
# 拷贝配置文件到容器中
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"]