From fc7f2ab3d3fe8c3427b2629ba6493040a6306c01 Mon Sep 17 00:00:00 2001 From: slaventius Date: Mon, 6 Feb 2023 17:46:40 +0300 Subject: [PATCH] * --- README.md | 4 ++++ deploy/Dockerfile | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 deploy/Dockerfile diff --git a/README.md b/README.md index cede9a2..ee79b4b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # authPostman +* http://git.slaventius.ru/test3k/authPostman.git +* docker build --no-cache --tag slaventius/test3k_auth_postman:latest ./deploy/ +* docker push slaventius/test3k_auth_postman:latest + diff --git a/deploy/Dockerfile b/deploy/Dockerfile new file mode 100644 index 0000000..2a430d6 --- /dev/null +++ b/deploy/Dockerfile @@ -0,0 +1,26 @@ +FROM alpine/git AS downloader +ARG project_dir="/test3k_auth_postman" +ARG project_name="test3k_auth_postman" +ARG project_repo="http://git.slaventius.ru/test3k/authPostman.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_postman" +ARG project_name="test3k_auth_postman" +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_postman" +ARG project_dir="/test3k_auth_postman" +ARG project_name="test3k_auth_postman" +COPY --from=builder /go${project_dir}/${project_name} /bin/test3k_auth_postman +# +WORKDIR /bin +ENTRYPOINT [ "/bin/test3k_auth_postman" ] +#dckr_pat_ghyegOXFr3vViufK49FWOHtrRvQ \ No newline at end of file