Skip to content

Commit e19c775

Browse files
committed
made this example better
1 parent dcbaad0 commit e19c775

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

README-SDK.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,12 +448,18 @@ shared_ctx_obj = runloop.storage_object.upload_from_bytes(
448448
blueprint_with_context = runloop.blueprint.create(
449449
name="my-blueprint-with-context",
450450
dockerfile=\"\"\"\
451-
FROM ubuntu:22.04
452-
WORKDIR /app
451+
FROM node:22
452+
WORKDIR /usr/src/app
453+
453454
# copy using the build context from the object
454-
COPY app /app
455-
# use the named context
456-
RUN --mount=type=bind,from=shared,source=/,target=/shared ls -R /shared
455+
COPY package.json package.json
456+
COPY src src
457+
458+
# copy from named context
459+
COPY --from=shared / ./libs
460+
461+
RUN npm install --only=production
462+
CMD ["node", "src/app.js"]
457463
\"\"\",
458464
# Primary build context
459465
build_context=build_ctx_obj.as_build_context(),

0 commit comments

Comments
 (0)