-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from pinax-network/busybox-docker
Change build process to use busybox shell in container
- Loading branch information
Showing
2 changed files
with
21 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
FROM gcr.io/distroless/base-debian12:latest | ||
FROM golang:1.22.5-alpine3.20 AS build | ||
|
||
ADD /substreams-sink-sql /app/substreams-sink-sql | ||
ARG BUILDTIME | ||
ARG VERSION | ||
ARG REVISION | ||
|
||
ENV PATH "$PATH:/app" | ||
WORKDIR /build | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 go build -v -ldflags "-X main.version=${VERSION} -X main.commit=${REVISION} -X main.date=${BUILDTIME}" -o ./substreams-sink-sql ./cmd/substreams-sink-sql | ||
|
||
FROM gcr.io/distroless/static-debian12:latest | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=busybox:1.36.1-uclibc /bin/sh /bin/sh | ||
COPY --from=busybox:1.36.1-uclibc /bin/touch /bin/touch | ||
COPY --from=build /build/substreams-sink-sql . | ||
|
||
ENTRYPOINT ["/app/substreams-sink-sql"] |