-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from suyuan32/dev
chore: update dependencies
- Loading branch information
Showing
6 changed files
with
495 additions
and
505 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
FROM golang:1.20.2-alpine3.17 as builder | ||
FROM golang:1.20.3-alpine3.17 as builder | ||
|
||
# Define the project name | 定义项目名称 | ||
ARG PROJECT=job | ||
|
||
WORKDIR /app | ||
WORKDIR /build | ||
COPY . . | ||
|
||
RUN go env -w GO111MODULE=on \ | ||
&& go env -w GOPROXY=https://goproxy.cn,direct \ | ||
&& go env -w CGO_ENABLED=0 \ | ||
&& go env \ | ||
&& go mod tidy \ | ||
&& go build -ldflags="-s -w" -o /app/${PROJECT}_rpc ${PROJECT}.go | ||
&& go build -ldflags="-s -w" -o /build/${PROJECT}_rpc ${PROJECT}.go | ||
|
||
FROM alpine:latest | ||
|
||
|
@@ -20,16 +19,17 @@ ARG PROJECT=job | |
# Define the config file name | 定义配置文件名 | ||
ARG CONFIG_FILE=job.yaml | ||
# Define the author | 定义作者 | ||
ARG AUTHOR=RyanSU@[email protected] | ||
ARG AUTHOR="[email protected]" | ||
|
||
LABEL MAINTAINER=${AUTHOR} | ||
LABEL org.opencontainers.image.authors=${AUTHOR} | ||
|
||
WORKDIR /app | ||
ENV PROJECT=${PROJECT} | ||
ENV CONFIG_FILE=${CONFIG_FILE} | ||
|
||
COPY --from=builder /app/${PROJECT}_rpc ./ | ||
COPY --from=builder /app/etc/${CONFIG_FILE} ./etc/ | ||
COPY --from=builder /build/${PROJECT}_rpc ./ | ||
COPY --from=builder /build/etc/${CONFIG_FILE} ./etc/ | ||
|
||
EXPOSE 9105 | ||
|
||
ENTRYPOINT ./${PROJECT}_rpc -f etc/${CONFIG_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.