-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduce number of layers in connectrpc/kotlin:v0.7.0
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# syntax=docker/dockerfile:1.8 | ||
FROM debian:bookworm-20240701 AS build | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl | ||
&& apt-get install -y curl | ||
WORKDIR /app | ||
RUN curl -fsSL -o /app/protoc-gen-connect-kotlin.jar https://repo1.maven.org/maven2/com/connectrpc/protoc-gen-connect-kotlin/0.7.0/protoc-gen-connect-kotlin-0.7.0.jar | ||
|
||
FROM gcr.io/distroless/java17-debian12:latest@sha256:c8c2c236c63d7652b707a05b02d0259db91d5feb357e9dc53942f73c2e001088 | ||
WORKDIR /app | ||
COPY --from=build /app/protoc-gen-connect-kotlin.jar /app | ||
CMD ["/app/protoc-gen-connect-kotlin.jar"] | ||
FROM gcr.io/distroless/java17-debian12:latest@sha256:c8c2c236c63d7652b707a05b02d0259db91d5feb357e9dc53942f73c2e001088 as base | ||
|
||
FROM scratch | ||
COPY --from=base --link / / | ||
COPY --from=build --link --chmod=0755 --chown=root:root /app/protoc-gen-connect-kotlin.jar . | ||
USER nobody | ||
ENTRYPOINT [ "/usr/bin/java", "-jar", "/protoc-gen-connect-kotlin.jar"] |