diff --git a/.github/workflows/postman-build-and-publish.yml b/.github/workflows/postman-build-and-publish.yml index b72388022..ab2246112 100644 --- a/.github/workflows/postman-build-and-publish.yml +++ b/.github/workflows/postman-build-and-publish.yml @@ -71,7 +71,11 @@ jobs: push: true tags: | ${{ env.IMAGE_NAME }}:${{ env.COMMIT_TAG }}-${{ env.UNTESTED_TAG_SUFFIX }} - cache-from: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache - cache-to: type=registry,ref=${{ env.IMAGE_NAME }}:buildcache,mode=max + cache-from: | + type=registry,ref=${{ env.IMAGE_NAME }}:buildcache-amd64,platform=linux/amd64 + type=registry,ref=${{ env.IMAGE_NAME }}:buildcache-arm64,platform=linux/arm64 + cache-to: | + type=registry,ref=${{ env.IMAGE_NAME }}:buildcache-amd64,mode=max,platform=linux/amd64 + type=registry,ref=${{ env.IMAGE_NAME }}:buildcache-arm64,mode=max,platform=linux/arm64 build-args: | NATIVE_LIBS_RELEASE_TAG=blob-libs-v1.0.1 diff --git a/sdk/Dockerfile b/sdk/Dockerfile index fc733355c..c77e6993b 100644 --- a/sdk/Dockerfile +++ b/sdk/Dockerfile @@ -5,6 +5,11 @@ ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable +RUN apt-get update \ + && apt-get install -y --no-install-recommends python3 ca-certificates bash curl make g++ \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + FROM base AS builder WORKDIR /usr/src/app @@ -16,10 +21,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json ./ COPY ./sdk/package.json ./sdk/package.json COPY ./ts-libs/linea-native-libs/package.json ./ts-libs/linea-native-libs/package.json -RUN --mount=type=cache,id=pnpm,target=/pnpm/store apt-get update && apt-get install -y --no-install-recommends python3 ca-certificates bash curl make g++ \ - && pnpm install --frozen-lockfile --prefer-offline --ignore-scripts \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && rm -rf /var/lib/apt/lists/* +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prefer-offline --ignore-scripts COPY ./sdk ./sdk COPY ts-libs/linea-native-libs ./ts-libs/linea-native-libs @@ -27,7 +29,7 @@ COPY ts-libs/linea-native-libs ./ts-libs/linea-native-libs RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm run build \ && pnpm deploy --filter=./sdk --prod ./prod/sdk -FROM base AS production +FROM node:lts-slim AS production ENV NODE_ENV=production diff --git a/sdk/README.md b/sdk/README.md index 5a11cd9cb..702e8fbdc 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -40,5 +40,3 @@ This package exposes two main classes for usage: ## License This package is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for more information. - -