Giter Club home page Giter Club logo

Comments (4)

ebauger avatar ebauger commented on July 17, 2024 1

Hi @mohsenari. Hope you are doing well.

If it could help, I created a repo without the corepack. It uses nodePackages.pnpm instead.

Here the repo : https://github.com/ebauger/without-corepack-devbox-test

podman work well and I don't have symlink issues.

What look like:

❯ devbox shell
Starting a devbox shell...
❯ whereis pnpm
pnpm: /Users/ebauger/dev/without-corepack-devbox-test/.devbox/nix/profile/default/bin/pnpm
❯ cat Dockerfile
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: Dockerfile
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ FROM jetpackio/devbox:latest
   2   │
   3   │ # Installing your devbox project
   4   │ WORKDIR /code
   5   │ USER root:root
   6   │ RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
   7   │ USER ${DEVBOX_USER}:${DEVBOX_USER}
   8   │ COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
   9   │ COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
  10   │
  11   │
  12   │
  13   │ RUN devbox run -- echo "Installed Packages."
  14   │
  15   │ CMD ["devbox", "shell"]
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ podman build -t test .
STEP 1/9: FROM jetpackio/devbox:latest
Resolving "jetpackio/devbox" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/jetpackio/devbox:latest...
Getting image source signatures
Copying blob sha256:e7f06eb296052d59472accfd753c5a1e338f74ff53e3c5cbc9d4278b3ce3a4f8
Copying blob sha256:a8c897c2272ab451068fcaff42090c30b5690332fe573e2ce9045c25e73c0842
Copying blob sha256:05720a4cd87d1833c1b7c875b87f17a0d41bcf1fe2b7e8faa28fbe78c16db98b
Copying blob sha256:0efe800ee49493ea45d223bcc90ba3f0b74feb0ce0903fbf28c60a7b1d150501
Copying blob sha256:8d6cca6d3a6387d414eea9627b7351bfa167e1ab45d0dc8d33e61c8b0c57ce4d
Copying blob sha256:0f5575c0ae692b72090e09e4d1b3d5fa2de8eb13a977e6baaea6aa1fa27abd4b
Copying blob sha256:e19488a141da8674756a25d1b9c3ef64c4cf831de73f9f347070d710d286a61c
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying blob sha256:b102056a868900c96c0100738439ec2ba44f9c06c3456c5d3013dfe6bf2faf80
Copying blob sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
Copying config sha256:86994aa466ddc28a94b9104354c45eacff5bc9393b01d457201d12835144b867
Writing manifest to image destination
STEP 2/9: WORKDIR /code
--> 175c080b959f
STEP 3/9: USER root:root
--> 0c294fa6cecc
STEP 4/9: RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
--> b50e08a72d55
STEP 5/9: USER ${DEVBOX_USER}:${DEVBOX_USER}
--> f8b95d5487a0
STEP 6/9: COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
--> 4bfe3e571b0c
STEP 7/9: COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
--> 004cdf37c092
STEP 8/9: RUN devbox run -- echo "Installed Packages."
✓ Downloading version 0.10.4... [DONE]
✓ Verifying checksum... [DONE]
✓ Unpacking binary... [DONE]

Info: Ensuring packages are installed.
[1/14] nodePackages.pnpm@8
...

from devbox.

mohsenari avatar mohsenari commented on July 17, 2024

@ebauger thanks for reporting this issue and also making a git repo.
The symlink error seems to be happening because podman expects pnpm.js to be under /var/tmp/libpod_builder... but devbox sets up symlinks to binaries in each project's .devbox/ directory.
So this seems to be a podman specific issue but I'm looking into setting a different location for podman temp build location.

from devbox.

ebauger avatar ebauger commented on July 17, 2024

@ebauger thanks for reporting this issue and also making a git repo.
The symlink error seems to be happening because podman expects pnpm.js to be under /var/tmp/libpod_builder... but devbox sets up symlinks to binaries in each project's .devbox/ directory.
So this seems to be a podman specific issue but I'm looking into setting a different location for podman temp build location.

I had a similar issue with the symlink error without podman with a new user on devbox shell.

But I cannot reproduce it :(

from devbox.

ebauger avatar ebauger commented on July 17, 2024

I tried this on an active shell.

(devbox)
❯ devbox generate dockerfile
❯ ls
.rw-r--r-- 537 ebauger 10 avr 14:46  devbox.json
.rw-r--r-- 23k ebauger 10 avr 14:46  devbox.lock
.rw-r--r-- 275 ebauger 10 avr 14:47  package.json
.rw-r--r--  93 ebauger 10 avr 14:48  pnpm-lock.yaml
.rw-r--r-- 398 ebauger 10 avr 14:49  Dockerfile
❯ podman build -t test .
Error: invalid symlink "/var/tmp/libpod_builder508066718/build/.devbox/virtenv/nodejs/corepack-bin/pnpm" -> "../../../../../../../../nix/store/xjgg53kjjhwcx4p3dmywjmqjbv82xhyn-nodejs-20.11.1/lib/node_modules/corepack/dist/pnpm.js"
❯ whereis pnpm
whereis: error processing manpath results: Illegal seek

And exit and retry a new shell. The '//' it's normal?

❯   whereis pnpm
pnpm: /Users/myuser/dev/corepack-devbox-test/.devbox/virtenv/nodejs/corepack-bin//pnpm

from devbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.