yarn install error Couldn't find a package.json during Docker build

Yarn version: 0.21.2

Nodejs version: 6.9 and 4.7

  • Missing Carriage Return in Docker for Mac Containers
  • difference between localhost and postgres for host in docker
  • Django unable to connect to database.
  • How to initialize a postgres database tables in microservice architecture with node running in docker
  • Docker issue in sharing folder on windows host through VBoxManage command
  • Docker stops previous running container with the same image. Why?
  • When running yarn locally it works

    When running npm install it works

    When running yarn install Dockerfile (docker build .) it fails with: error Couldn't find a package.json file in "/root/.cache/yarn/npm-readable-stream-2.2.2-a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"

    I have absolutely no idea why.

    Step 16 : RUN yarn install
     ---> Running in 917c2b1b57fb
    yarn install v0.21.2
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    error Couldn't find a package.json file in "/root/.cache/yarn/npm-readable-stream-2.2.2-a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    The command '/bin/sh -c yarn install' returned a non-zero code: 1

    Yarn is installed this way in the Dockerfile

    RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.21.2
    ENV PATH /root/.yarn/bin:$PATH

  • Docker History Base Image Add:sha256hash
  • How can I submit a Spark job to YARN cluster with Docker Container Executor as YARN container?
  • nginx not starting inside Docker [duplicate]
  • How to mimic a Docker registry down situation
  • Docker permissios shared Volume on mac
  • What docker image use for ionic CD / e2e testing? Ubuntu or just node?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.