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

Wrong file paths within Docker environment #10

Open
4 of 5 tasks
roonie007 opened this issue Apr 7, 2024 · 0 comments
Open
4 of 5 tasks

Wrong file paths within Docker environment #10

roonie007 opened this issue Apr 7, 2024 · 0 comments

Comments

@roonie007
Copy link

roonie007 commented Apr 7, 2024

Describe the bug

When using this module with simply running yarn run dev everything works perfectly, but as soon as we start using it within docker ( dev environment ), we get the wrong path on the generated files.

For example, for an app that is running inside a docker container and the whole app is mounted on this path /usr/src/app but the actually code on the machine is on this path /home/***/workspace/project, the generated files will use the docker mounted path /usr/src/app.

image

So maybe the solution is to use the relative path instead of the absolute path ?

Reproduction

Any simple project with the server-fn module running inside a docker container

version: '3.8'
services:
  app:
    image: bitnami/node:20.10.0
    working_dir: /usr/src/app
    restart: unless-stopped
    volumes:
      - .:/usr/src/app
    network_mode: host
    command: ['yarn', 'dev']

System Info

System:
  OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
  CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-12600K
  Memory: 21.65 GB / 27.30 GB
  Container: Yes
  Shell: 5.1.16 - /bin/bash
Binaries:
  Node: 21.7.2 - ~/.nvm/versions/node/v21.7.2/bin/node
  Yarn: 1.22.19 - /usr/bin/yarn
  npm: 10.5.0 - ~/.nvm/versions/node/v21.7.2/bin/npm
  pnpm: 8.15.4 - ~/.local/share/pnpm/pnpm
  bun: 1.1.1 - ~/.bun/bin/bun

Used Package Manager

yarn

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
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

No branches or pull requests

1 participant