Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

feat(onchain): switching from alpine to bullseye #44

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
13 changes: 7 additions & 6 deletions onchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
# the License.

# syntax=docker.io/docker/dockerfile:1.4
FROM node:16.17.0-alpine3.15 as base
ARG NODEJS_VERSION=18.16.0
FROM node:${NODEJS_VERSION}-bullseye as base

# this stage installs system dependencies for building the node projects
FROM base as builder

# install git and python3
RUN <<EOF
apk update
apk add --no-cache g++ git make python3
rm -rf /var/cache/apk/*
apt-get update
apt-get install -y git
rm -rf /var/lib/apt/lists/*
EOF

WORKDIR /app
Expand Down Expand Up @@ -48,7 +49,7 @@ RUN yarn build
RUN npm install -g .

# this stage is runtime image for rollups (hardhat)
FROM base as hardhat
FROM node:${NODEJS_VERSION}-bullseye-slim as hardhat

# copy yarn build
COPY --from=rollups-builder /app /app
Expand All @@ -61,6 +62,6 @@ ENTRYPOINT ["npx", "hardhat"]
CMD ["node"]

# this stage is runtime for rollups-cli (built with esbuild)
FROM base as cli
FROM node:${NODEJS_VERSION}-bullseye-slim as cli
COPY --from=cli-builder /usr/local/bin/cartesi-rollups /usr/local/bin/
ENTRYPOINT ["cartesi-rollups"]