Dockerfile 935 B

123456789101112131415161718192021222324252627
  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 --from=builder /output/OAuth /usr/local/bin
  18. COPY ./bin/linux/OAuth /usr/local/bin
  19. COPY ./conf/ /etc/conf/
  20. #COPY /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  21. EXPOSE 8000
  22. CMD ["Medical_OAuth","server","-c", "/etc/conf/settings.yml"]