R
Railway9mo ago
stars

error mounting for docker container

Hey! I've been trying to deploy my TypeScript esbuild React.js app to Railway and it's been working fine for a while, but I infrequently get the following error:
#11 [stage-0 7/10] COPY . /app/.



#11 DONE 0.5s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build



#12 0.127 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff" to rootfs at "/app/./.tsbuildinfo": mount /var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff:/app/./.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

#12 ERROR: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build:

0.127 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff" to rootfs at "/app/./.tsbuildinfo": mount /var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff:/app/./.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

-----

Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1



Error: Docker build failed
#11 [stage-0 7/10] COPY . /app/.



#11 DONE 0.5s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build



#12 0.127 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff" to rootfs at "/app/./.tsbuildinfo": mount /var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff:/app/./.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

#12 ERROR: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build:

0.127 runc run failed: unable to start container process: error during container init: error mounting "/var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff" to rootfs at "/app/./.tsbuildinfo": mount /var/lib/docker/overlay2/ze64x9tvsxo503qql6baih2xv/diff:/app/./.tsbuildinfo (via /proc/self/fd/6), flags: 0x5000: not a directory

-----

Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/tsbuildinfo,target=/app/./.tsbuildinfo --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-next/cache,target=/app/.next/cache --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-node_modules/cache,target=/app/node_modules/.cache yarn run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c yarn run build" did not complete successfully: exit code: 1



Error: Docker build failed
This used to happen infrequently, but now it's persistent and won't let me deploy? Thanks for any help!
12 Replies
Percy
Percy9mo ago
Project ID: 462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2,462d7304-5191-4aae-a91c-09bd401f3ea2
stars
stars9mo ago
Project ID: ceb881e9-0cf9-447d-8d04-c336121732a4 Service ID: 462d7304-5191-4aae-a91c-09bd401f3ea2 If I can provide any more information please ask, but there's nothing I can see that might be related. The yarn install works just fine:
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile



#10 0.812 yarn install v1.22.19



#10 0.934 [1/4] Resolving packages...



#10 1.693 [2/4] Fetching packages...

#10 1.720 warning Pattern ["@graphql-codegen/plugin-helpers@latest"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-@graphql-codegen-plugin-helpers-5.0.1-e2429fcfba3f078d5aa18aa062d46c922bbb0d55-integrity/node_modules/@graphql-codegen/plugin-helpers" as pattern ["@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0"]. This could result in non-deterministic behavior, skipping.



#10 50.78 [3/4] Linking dependencies...



#10 50.79 warning " > @pcode-at/tinacms-seo@2.0.0" has unmet peer dependency "next-seo@6.0.0".

#10 50.79 warning " > @pcode-at/tinacms-seo@2.0.0" has incorrect peer dependency "tinacms@1.4.3".

#10 50.80 warning "notistack > goober@2.1.13" has unmet peer dependency "csstype@^3.0.10".

#10 50.80 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".

#10 50.80 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".

#10 50.81 warning "tinacms > final-form-arrays@3.1.0" has incorrect peer dependency "final-form@^4.20.8".

#10 50.89 warning Workspaces can only be enabled in private projects.

#10 50.90 warning Workspaces can only be enabled in private projects.



#10 50.91 warning Workspaces can only be enabled in private projects.

#10 50.95 warning Workspaces can only be enabled in private projects.

#10 50.95 warning Workspaces can only be enabled in private projects.



#10 82.71 [4/4] Building fresh packages...



#10 85.65 $ husky install

#10 85.76 fatal: not a git repository (or any of the parent directories): .git



#10 85.76 husky - git command not found, skipping install

#10 85.77 Done in 84.96s.



#10 DONE 86.3s
#10 [stage-0 6/10] RUN --mount=type=cache,id=s/462d7304-5191-4aae-a91c-09bd401f3ea2-/usr/local/share/cache/yarn/v6,target=/usr/local/share/.cache/yarn/v6 yarn install --frozen-lockfile



#10 0.812 yarn install v1.22.19



#10 0.934 [1/4] Resolving packages...



#10 1.693 [2/4] Fetching packages...

#10 1.720 warning Pattern ["@graphql-codegen/plugin-helpers@latest"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-@graphql-codegen-plugin-helpers-5.0.1-e2429fcfba3f078d5aa18aa062d46c922bbb0d55-integrity/node_modules/@graphql-codegen/plugin-helpers" as pattern ["@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0","@graphql-codegen/plugin-helpers@^5.0.0"]. This could result in non-deterministic behavior, skipping.



#10 50.78 [3/4] Linking dependencies...



#10 50.79 warning " > @pcode-at/tinacms-seo@2.0.0" has unmet peer dependency "next-seo@6.0.0".

#10 50.79 warning " > @pcode-at/tinacms-seo@2.0.0" has incorrect peer dependency "tinacms@1.4.3".

#10 50.80 warning "notistack > goober@2.1.13" has unmet peer dependency "csstype@^3.0.10".

#10 50.80 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".

#10 50.80 warning "react-scripts > eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".

#10 50.81 warning "tinacms > final-form-arrays@3.1.0" has incorrect peer dependency "final-form@^4.20.8".

#10 50.89 warning Workspaces can only be enabled in private projects.

#10 50.90 warning Workspaces can only be enabled in private projects.



#10 50.91 warning Workspaces can only be enabled in private projects.

#10 50.95 warning Workspaces can only be enabled in private projects.

#10 50.95 warning Workspaces can only be enabled in private projects.



#10 82.71 [4/4] Building fresh packages...



#10 85.65 $ husky install

#10 85.76 fatal: not a git repository (or any of the parent directories): .git



#10 85.76 husky - git command not found, skipping install

#10 85.77 Done in 84.96s.



#10 DONE 86.3s
and the error above directly follows To note, the husky install step has performed exactly the same in prior deployments and does not block any install
Brody
Brody9mo ago
can you set a service variable NIXPACKS_NO_CACHE to 1 and let me know if that changes anything
stars
stars9mo ago
sure just got back from lunch - apologies for the delayed response
Brody
Brody9mo ago
no worries
stars
stars9mo ago
We're getting a new build issue (with the actual code) so that's hopeful - I need to go talk with the library's support staff as it seems to be a bug with their platform but once that's resolved I'll let you know if it all works for us :D
Brody
Brody9mo ago
sounds good!
stars
stars9mo ago
But yeah that env seems to have worked - any idea what could cause that bug? I assume something's being cached too long/incorrectly but I'm not sure if that's our own fault
Brody
Brody9mo ago
thats the same thing i assumed
jr
jr9mo ago
I beleive this happens when the .tsbuildinfo file is committed in the repo. Ideally it is not committed and generated when Railway builds for the first time, and then cached and used in subsequent deploys
Brody
Brody9mo ago
ah very insightful, @stars would you happen to be committing your .tsbuildinfo to your repo?
stars
stars9mo ago
Now you mention it i did notice one of our devs add it That is super insightful