1234567891011121314151617181920212223242526 |
- # FROM ... AS builder : 表示依赖的镜像只是使用在编译阶段
- #FROM golang:1.19 AS builder
- #ARG VERSION=""
- #ARG VCS_BRANCH=""
- #ARG PROJECT_NAME=OAuth
- #ARG DOCKER_PROJECT_DIR=/build
- #ARG EXTRA_BUILD_ARGS=""
- # 编译阶段的工作目录,也可以作为全局工作目录
- #WORKDIR $DOCKER_PROJECT_DIR
- #COPY . $DOCKER_PROJECT_DIR
- #ENV GOPROXY="https://goproxy.cn,direct"
- #RUN git config --global url."gogs.baozhida.cn/zoie/OAuth-core".insteadOf "https://gogs.baozhida.cn/zoie/OAuth-core" && \
- # mkdir -p /output && \
- # make build-linux -e OUTPUT_FILE_LINUX=/output/OAuth \
- # -e VERSION=$VERSION -e VCS_BRANCH=$VCS_BRANCH -e EXTRA_BUILD_ARGS=$EXTRA_BUILD_ARGS
- FROM alpine
- COPY ./bin/linux/GasCylinderApi /usr/local/bin
- COPY ./conf/ /etc/conf/
- #COPY /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- EXPOSE 8000
- CMD ["cold-delivery","server","-c", "/etc/conf/settings.yml"]
|