Skip to content

Update dockerfile#27

Merged
mincong-h merged 6 commits intomainfrom
dockerfile
Jan 29, 2025
Merged

Update dockerfile#27
mincong-h merged 6 commits intomainfrom
dockerfile

Conversation

@mincong-h
Copy link
Contributor

@mincong-h mincong-h commented Jan 29, 2025

The default Dockerfile does not work for pnpm workspace. This PR fixes it

Testing

docker buildx build --platform linux/amd64 -t "vertesia/github-agent:latest" -f apps/github-agent/Dockerfile .
➜  github-agent git:(dockerfile|u=) vertesia agent run
! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-9.15.0.tgz

> @vertesia/github-agent@1.10.0 start /workspace/apps/github-agent
> node lib/main.js

Configuring logger on stdout
Create Runtime Logger for Temporal: INFO
(node:32) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[09:50:38.034] INFO (llm-studio/32): Starting worker version: 1.0.0
[09:50:38.123] INFO (llm-studio/32): Getting temporal client cert pair from vault
    temporal: {
      "tlsCertificatePath": "tmprl_dev_zeno-worker_crt",
      "tlsPrivateKeyPath": "tmprl_dev_zeno-worker_key"
    }
[09:50:38.123] INFO (llm-studio/32): Getting secret from Google Secret Manager: tmprl_dev_zeno-worker_crt
[09:50:38.124] INFO (llm-studio/32): Getting secret from Google Secret Manager: tmprl_dev_zeno-worker_key

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
RUN pnpm run -r build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this because the build script is not available at the top level of the workspace

Comment on lines +20 to +21
COPY --from=build /app/apps/github-agent/lib /app/apps/github-agent/lib
COPY --from=build /app/apps/github-agent/bin /app/apps/github-agent/bin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the comment compatible with the workspace

@mincong-h mincong-h merged commit 34da0d6 into main Jan 29, 2025
2 checks passed
@mincong-h mincong-h deleted the dockerfile branch January 29, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant