Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A corrected and slightly refined version #1516

Open
olegmosso opened this issue Sep 1, 2024 · 0 comments
Open

A corrected and slightly refined version #1516

olegmosso opened this issue Sep 1, 2024 · 0 comments

Comments

@olegmosso
Copy link

Download Go dependencies

FROM golang:1.21-alpine3.19 AS base

WORKDIR /src
COPY ./bridge-history-api/go.* ./
RUN go mod download -x

Build db_cli

FROM base AS builder

WORKDIR /src/bridge-history-api/cmd/db_cli
RUN --mount=type=cache,target=/root/.cache/go-build
go build -v -p 4 -o /bin/db_cli

Pull db_cli into a second stage deploy alpine container

FROM alpine:latest
COPY --from=builder /bin/db_cli /bin/db_cli
WORKDIR /app
ENTRYPOINT ["/bin/db_cli"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant