Dockerfile 897 B

1234567891011121314151617181920212223242526
  1. # FROM ... AS builder : 表示依赖的镜像只是使用在编译阶段
  2. #FROM golang:1.19 AS builder
  3. #ARG VERSION=""
  4. #ARG VCS_BRANCH=""
  5. #ARG PROJECT_NAME=OAuth
  6. #ARG DOCKER_PROJECT_DIR=/build
  7. #ARG EXTRA_BUILD_ARGS=""
  8. # 编译阶段的工作目录,也可以作为全局工作目录
  9. #WORKDIR $DOCKER_PROJECT_DIR
  10. #COPY . $DOCKER_PROJECT_DIR
  11. #ENV GOPROXY="https://goproxy.cn,direct"
  12. #RUN git config --global url."gogs.baozhida.cn/zoie/OAuth-core".insteadOf "https://gogs.baozhida.cn/zoie/OAuth-core" && \
  13. # mkdir -p /output && \
  14. # make build-linux -e OUTPUT_FILE_LINUX=/output/OAuth \
  15. # -e VERSION=$VERSION -e VCS_BRANCH=$VCS_BRANCH -e EXTRA_BUILD_ARGS=$EXTRA_BUILD_ARGS
  16. FROM alpine
  17. COPY ./bin/linux/GasCylinderApi /usr/local/bin
  18. COPY ./conf/ /etc/conf/
  19. #COPY /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  20. EXPOSE 8000
  21. CMD ["gas-cylinder-api","server","-c", "/etc/conf/settings.yml"]