diff --git a/Jenkinsfile b/Jenkinsfile index ffdea90..e0c9fbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ def pipeline = new org.rust.AppPipeline(steps: this, initSubmodules: true, envImageName: 'docker.soramitsu.co.jp/sora2/env:latest', appImageName: 'docker.soramitsu.co.jp/sora2/bridge-relayer', - pushTags: ['master':'latest', 'ton-bridge': 'ton-bridge'], + pushTags: ['master':'latest', 'duty/bridge-relayer-distroless': 'distroless'], buildTestCmds: 'housekeeping/build.sh', codeCoverageCommand: './housekeeping/coverage.sh', clippyLinter: false, diff --git a/housekeeping/docker/release/Dockerfile.distroless b/housekeeping/docker/release/Dockerfile.distroless new file mode 100644 index 0000000..f3c835d --- /dev/null +++ b/housekeeping/docker/release/Dockerfile.distroless @@ -0,0 +1,20 @@ +FROM debian:bookworm-slim AS builder + +RUN apt-get update && apt-get install -y \ + ca-certificates libssl3 && \ + apt-get clean + +RUN mkdir -p /libs + +COPY ./target/release/bridge-relayer /usr/local/bin/relayer + +RUN ldd /usr/local/bin/relayer | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /libs/ + +FROM gcr.io/distroless/cc-debian12:nonroot + +COPY --from=builder /libs/* /usr/lib/ +COPY --from=builder /usr/local/bin/relayer /usr/local/bin/relayer + +USER 10000 + +CMD ["/usr/local/bin/relayer"] \ No newline at end of file