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

ci: shrink docker image #7

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: test

on: [push]
on: [push, pull_request]

jobs:
test:
Expand Down
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM clojure:latest
ARG BUILD_FROM=clojure:latest
ARG RUN_FROM=eclipse-temurin:8u422-b05-jre-noble

FROM ${BUILD_FROM} AS builder

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand All @@ -7,4 +10,10 @@ COPY . /usr/src/app
RUN clojure -T:build uber && \
mv target/emqx-snowflake-proxy-*-standalone.jar app-standalone.jar

FROM ${RUN_FROM} AS runner

COPY --from=builder /usr/src/app/app-standalone.jar /opt/proxy/app-standalone.jar

WORKDIR /opt/proxy

CMD ["java", "-jar", "app-standalone.jar"]
Loading