Compare commits
No commits in common. "c539e684867d67092afdda39dec7664c7bc40829" and "269fd8f5c52a609855ea10e48744aaed1bce5a86" have entirely different histories.
c539e68486
...
269fd8f5c5
3
.github/workflows/test_project.yml
vendored
3
.github/workflows/test_project.yml
vendored
@ -24,6 +24,9 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
- name: run tidy
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
- name: test with go
|
- name: test with go
|
||||||
run: go test -v ./...
|
run: go test -v ./...
|
||||||
|
|
||||||
|
|||||||
20
Dockerfile
20
Dockerfile
@ -1,17 +1,7 @@
|
|||||||
|
FROM alpine:latest
|
||||||
FROM golang:alpine AS builder
|
ARG BINAME=tgbuser-grpc-linux-arm64-0.0.0_1
|
||||||
ARG TARGETARCH
|
COPY ./bin/${BINAME} /usr/bin/tgbuser-grpc
|
||||||
ARG version=not-set
|
RUN mkdir /app
|
||||||
ARG SHORTSHA=not-set
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
|
||||||
# https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm
|
|
||||||
RUN go build -o bin/tgbuser \
|
|
||||||
-ldflags "-X main.Shortsha=${SHORTSHA} \
|
|
||||||
-X main.Version=${version} \
|
|
||||||
-X main.Aarch=${TARGETARCH}" ./cmd
|
|
||||||
|
|
||||||
FROM alpine AS runner
|
ENTRYPOINT tgbuser-grpc
|
||||||
COPY --from=builder /app/bin/tgbuser /usr/bin/
|
|
||||||
WORKDIR /app
|
|
||||||
ENTRYPOINT /usr/bin/tgbuser
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user