Skip to content

Instantly share code, notes, and snippets.

@r17x
Last active September 6, 2018 06:55
Show Gist options
  • Select an option

  • Save r17x/2beb4f6ac907bc5d5fb4e3b3cdf0dad5 to your computer and use it in GitHub Desktop.

Select an option

Save r17x/2beb4f6ac907bc5d5fb4e3b3cdf0dad5 to your computer and use it in GitHub Desktop.
[Yarn] Docker Problem With yarn install

Problem: Unsuccessful deployment javascript application when update package.json

  • yarn
  • docker
# Example error Message
Step 4/8 : RUN yarn install
 ---> Running in hashnumber
yarn install v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
error Couldn't find the binary git
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote: The command '/bin/sh -c yarn install' returned a non-zero code: 1
To user@repository
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'user@repository'

Solution:

 # Dockerfile
 
 ENV NPM_CONFIG_LOGLEVEL warn
 RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh
 COPY . .
 RUN yarn install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment