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