Dockerfile 475 B

123456789101112131415161718192021
  1. FROM alpine:3.19
  2. # Define the project name | 定义项目名称
  3. ARG PROJECT=wechat
  4. # Define the config file name | 定义配置文件名
  5. ARG CONFIG_FILE=wechat.yaml
  6. # Define the author | 定义作者
  7. ARG AUTHOR="example@example.com"
  8. LABEL org.opencontainers.image.authors=${AUTHOR}
  9. WORKDIR /app
  10. ENV PROJECT=${PROJECT}
  11. ENV CONFIG_FILE=${CONFIG_FILE}
  12. COPY ./${PROJECT}_api ./
  13. COPY ./etc/${CONFIG_FILE} ./etc/
  14. EXPOSE 19101
  15. ENTRYPOINT ./${PROJECT}_api -f etc/${CONFIG_FILE}