GithubHelp home page GithubHelp logo

Comments (4)

pierreyves-lebrun avatar pierreyves-lebrun commented on June 16, 2024 1

I stumbled upon the same problem, which ends up being quite frustrating as all the workarounds I’ve seen so far are somewhat hacky.

Edit: actually there is one elegant solution to it:
https://code.visualstudio.com/docs/remote/containers

from docker-experiments.

topheman avatar topheman commented on June 16, 2024

A solution (from this twitter thread) might be to:

  • in local:
    • dont run frontend dev env in a docker container (use installed nodejs on the developer's computer)
    • have the frontend dependencies installed on host at ./front/node_modules, based on ./front/package.json - use yarn workspaces to have husky installed at the very root of the project ?
  • in CI:
    • run the frontend unit tests / build in a docker container
    • no change for the golang api (always in a container)

from docker-experiments.

topheman avatar topheman commented on June 16, 2024

The following resource may be useful as an intermediary step : https://nickjanetakis.com/blog/docker-tip-75-how-to-avoid-node-modules-in-your-volume-mounts

from docker-experiments.

topheman avatar topheman commented on June 16, 2024

I've been told about this solution. You're right @pierreyves-lebrun , this might be the first one true elegant way to solve that problem in a long time. cc @warpdesign

from docker-experiments.

Related Issues (1)

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.