Can't build Docker image: dangling symlink
asymmetric opened this issue · 1 comments
asymmetric commented
[root@tachikoma:/home/asymmetric/code/staking-payouts]# docker build .
Sending build context to Docker daemon 32.57MB
Step 1/7 : FROM node:latest
---> d2850632b602
Step 2/7 : COPY . /app
---> fe49cf71ffd8
Step 3/7 : WORKDIR /app
---> Running in 9fd61bc41de9
Removing intermediate container 9fd61bc41de9
---> 0c7afb83c3e9
Step 4/7 : RUN yarn install --production
---> Running in 02e53310a3a4
yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@substrate/dev > @babel/plugin-transform-modules-commonjs@7.13.8" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] Building fresh packages...
Done in 16.13s.
Removing intermediate container 02e53310a3a4
---> 24ca47cee75d
Step 5/7 : RUN yarn link
---> Running in 4be9fc469900
yarn link v1.22.5
success Registered "@zekemostov/staking-payouts".
info You can now run `yarn link "@zekemostov/staking-payouts"` in the projects where you want to use this package and it will be used instead.
Done in 0.08s.
Removing intermediate container 4be9fc469900
---> fe2623d78d8e
Step 6/7 : RUN chmod +x /usr/local/bin/payouts
---> Running in 035ab08db44b
chmod: cannot operate on dangling symlink '/usr/local/bin/payouts'
The command '/bin/sh -c chmod +x /usr/local/bin/payouts' returned a non-zero code: 1
emostov commented
I don't know much about docker but seems to work fine on my machine (macos)
zeke staking-payouts % docker build .
[+] Building 1.6s (11/11) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:latest 0.5s
=> [internal] load build context 0.9s
=> => transferring context: 1.62MB 0.9s
=> [1/6] FROM docker.io/library/node:latest@sha256:25516f3de85ebf588e29d81052495d2e1177b55cddbd7ddab2f5ff2c4496dd5e 0.0s
=> CACHED [2/6] COPY . /app 0.0s
=> CACHED [3/6] WORKDIR /app 0.0s
=> CACHED [4/6] RUN yarn install --production 0.0s
=> CACHED [5/6] RUN yarn link 0.0s
=> CACHED [6/6] RUN chmod +x /usr/local/bin/payouts 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:4b8d28f50c6152935b77d65cdba5e4f1dc62f2b16f35e40b7bc7d5d5ea163e18 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
zeke staking-payouts % docker --version
Docker version 20.10.5, build 55c4c88