Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to use unpublished( work-in-progressing) @atproto/api for ozone docker image, described hack in HACKING.md #87

Open
itaru2622 opened this issue Apr 7, 2024 · 2 comments
Labels
devex Related to development/deployment flow

Comments

@itaru2622
Copy link

HACKING.md describes how to use unpublished( work-in-progressing) atproto/api for ozone, in below section.
but this hack cannot use for building docker image as below error.
how can use unpublished atproto api in ozone docker image?

### Working with unpublished changes to the `@atproto/api` package

ozone/HACKING.md

Lines 57 to 65 in 7963bec

4. Update the package.json file in ozone/ to reference the local build of @atproto/api.
```diff
"dependencies": {
- "@atproto/api": "^0.0.3",
+ "@atproto/api": "link:../atproto/packages/api/dist",
"@headlessui/react": "^1.7.7",
```

docker build -t ozone .
 => [build 1/9] FROM docker.io/library/node:20.11-alpine3.18@sha...
 => [build 2/9] WORKDIR /usr/src/ozone
 => [build 3/9] COPY package.json yarn.lock .
 => [build 4/9] RUN yarn
 => [build 5/9] COPY . .
 => ERROR [build 6/9] RUN yarn build
------                                                                                                                                                                                                                           
 > [build 6/9] RUN yarn build:                                                                                                                                                                                                   
0.390 yarn run v1.22.19                                                                                                                                                                                                          
0.426 $ next build                                                                                                                                                                                                               
:
7.551 Failed to compile.
7.551 ./app/actions/ModActionPanel/BlobList.tsx
7.551 Module not found: Can't resolve '@atproto/api'
:
---
Dockerfile:8
--------------------
   6 |     RUN yarn
   7 |     COPY . .
   8 | >>> RUN yarn build
   9 |     RUN rm -rf node_modules .next/cache
  10 |     RUN mv service/package.json package.json && mv service/yarn.lock yarn.lock
@bnewbold
Copy link
Collaborator

bnewbold commented Apr 8, 2024

I'm not sure we have ever had the need to build a Docker image against a patched version of the api package? I can see why that might be desirable in some cases, but might not be something we support or provide documentation for.

@itaru2622
Copy link
Author

@bnewbold I understand that your point. it maybe rare case. but it is good that regardless published or un-published, code can work on docker (in same manner). for example, when developing new feature of atproto having impact on API, it becomes hard to make integration test on docker with ozone aheading publish(i.e posting new PR).

@bnewbold bnewbold added the devex Related to development/deployment flow label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex Related to development/deployment flow
Projects
None yet
Development

No branches or pull requests

2 participants