main
parent
5ff76cd388
commit
5cdcccea9a
2 changed files with 30 additions and 0 deletions
@ -1 +1,5 @@ |
|||||||
# authDB |
# authDB |
||||||
|
|
||||||
|
* http://git.slaventius.ru/test3k/authDB.git |
||||||
|
* docker build --no-cache --tag slaventius/test3k_auth_db:latest ./deploy/ |
||||||
|
* docker push slaventius/test3k_auth_db:latest |
@ -0,0 +1,26 @@ |
|||||||
|
FROM alpine/git AS downloader |
||||||
|
ARG project_dir="/test3k_auth_db" |
||||||
|
ARG project_name="test3k_auth_db" |
||||||
|
ARG project_repo="http://git.slaventius.ru/test3k/authDB.git" |
||||||
|
WORKDIR /tmp${project_dir} |
||||||
|
RUN git clone --depth=1 ${project_repo} /tmp${project_dir} |
||||||
|
# |
||||||
|
FROM golang:alpine AS builder |
||||||
|
ARG project_dir="/test3k_auth_db" |
||||||
|
ARG project_name="test3k_auth_db" |
||||||
|
RUN apk add git |
||||||
|
ENV GOPRIVATE=git.slaventius.ru/* |
||||||
|
ENV GOINSECURE=git.slaventius.ru |
||||||
|
WORKDIR /go/${project_dir} |
||||||
|
COPY --from=downloader /tmp${project_dir} . |
||||||
|
RUN go build -ldflags="-s -w" -o ./${project_name} ./cmd/main.go |
||||||
|
# |
||||||
|
FROM alpine |
||||||
|
LABEL description "test3k_auth_db" |
||||||
|
ARG project_dir="/test3k_auth_db" |
||||||
|
ARG project_name="test3k_auth_db" |
||||||
|
COPY --from=builder /go${project_dir}/${project_name} /bin/test3k_auth_db |
||||||
|
# |
||||||
|
WORKDIR /bin |
||||||
|
ENTRYPOINT [ "/bin/test3k_auth_db" ] |
||||||
|
#dckr_pat_ghyegOXFr3vViufK49FWOHtrRvQ |
Loading…
Reference in new issue