The error I see is “Error: @redwoodjs/cli tried to access @babel/core, but it isn’t declared in its dependencies; this makes the require call ambiguous and unsound.”
Interestingly, when I run the same command in a native runtime in Render, I don’t see this error.
I’m using RW 8, although the Dockerfile predates the new yarn rw setup docker
command:
FROM rust:1.80.0-slim-bookworm as core
RUN apt-get update && \
apt-get -y install pkg-config libssl-dev && \
rm -rf /var/lib/apt/lists/*
WORKDIR /rust
COPY core core
WORKDIR /rust/core
RUN mkdir .cargo && \
cargo vendor > .cargo/config && \
cargo build --release
FROM node:20-bookworm-slim
RUN corepack enable
RUN apt-get update && \
apt-get install -y openssl && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install -y ca-certificates && \
update-ca-certificates
RUN apt-get update && \
apt-get install -y python3 python3-pip
WORKDIR /app
COPY --from=core /rust/core/target/release scripts/core
COPY package.json package.json
COPY yarn.lock yarn.lock
COPY redwood.toml redwood.toml
COPY graphql.config.js graphql.config.js
COPY api/package.json api/package.json
RUN yarn install
COPY api api
COPY scripts scripts
RUN yarn rw build api
ENTRYPOINT [ "yarn", "rw", "exec", "jobWorker" ]