forked from Botanical/BotanJS
Rename the components
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
FROM golang:1.26-alpine3.23 AS build
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY resolver-go/go.mod resolver-go/go.sum ./
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
go mod download
|
||||
|
||||
COPY "botanjs/src" "./src"
|
||||
COPY "resolver-go/cmd" "./cmd"
|
||||
COPY "resolver-go/internal" "./internal"
|
||||
|
||||
RUN --mount=type=cache,target=/go/pkg/mod \
|
||||
--mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 \
|
||||
GOOS=$TARGETOS \
|
||||
GOARCH=$TARGETARCH \
|
||||
go build -trimpath -o /out/botan-api -ldflags='-s -w' ./cmd/botan-api
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=build /out/botan-api /usr/local/bin/botan-api
|
||||
COPY "botanjs/src" "./src"
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
ENTRYPOINT ["/usr/local/bin/botan-api", "-src", "./src", "-addr", ":8080"]
|
||||
Reference in New Issue
Block a user