30 lines
643 B
Docker
30 lines
643 B
Docker
# 表示依赖 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"] |