bin/rails: Permission denied
14 days ago
Having the same issue as others that started yesterday and still haven't been resolved. I'm completely blocked from deploying. No code changes that would impact this.
COPY . .
665ms
build
RUN echo "=== bin/ permissions after COPY ===" && ls -la bin/
104ms
=== bin/ permissions after COPY ===
total 64
drwxr-xr-x 2 root root 4096 Mar 1 18:21 .
drwxr-xr-x 1 root root 4096 Mar 1 18:21 ..
-rw-rw-r-- 1 root root 139 Nov 30 1979 brakeman
-rw-rw-r-- 1 root root 202 Nov 30 1979 bundler-audit
-rw-rw-r-- 1 root root 180 Nov 30 1979 ci
-rw-rw-r-- 1 root root 56 Nov 30 1979 dev
-rw-rw-r-- 1 root root 292 Nov 30 1979 docker-entrypoint
-rw-rw-r-- 1 root root 92 Nov 30 1979 importmap
-rw-rw-r-- 1 root root 117 Nov 30 1979 jobs
-rw-rw-r-- 1 root root 745 Nov 30 1979 kamal
-rw-rw-r-- 1 root root 141 Nov 30 1979 rails
-rw-rw-r-- 1 root root 90 Nov 30 1979 rake
-rw-rw-r-- 1 root root 266 Nov 30 1979 rubocop
-rw-rw-r-- 1 root root 1069 Nov 30 1979 setup
-rw-rw-r-- 1 root root 104 Nov 30 1979 thrust
build
RUN bundle exec bootsnap precompile -j 1 app/ lib/
775ms
build
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
97ms
/bin/sh: 1: ./bin/rails: Permission denied
Dockerfile:57
-------------------
55 |
56 | # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
57 | >>> RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
58 |
59 |
-------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile" did not complete successfully: exit code: 126
compared to a working project with the same exact set up:
=== bin/ permissions after COPY ===
total 60
drwxrwxr-x 2 root root 4096 Mar 1 18:24 .
drwxr-xr-x 1 root root 4096 Mar 1 18:25 ..
-rwxr-xr-x 1 root root 139 Mar 1 18:24 brakeman
-rwxr-xr-x 1 root root 2801 Mar 1 18:24 bundle
-rwxr-xr-x 1 root root 379 Mar 1 18:24 dev
-rwxr-xr-x 1 root root 292 Mar 1 18:24 docker-entrypoint
-rwxr-xr-x 1 root root 91 Mar 1 18:24 importmap
-rwxr-xr-x 1 root root 117 Mar 1 18:24 jobs
-rwxr-xr-x 1 root root 745 Mar 1 18:24 kamal
-rwxr-xr-x 1 root root 141 Mar 1 18:24 rails
-rwxr-xr-x 1 root root 90 Mar 1 18:24 rake
-rwxr-xr-x 1 root root 266 Mar 1 18:24 rubocop
-rwxr-xr-x 1 root root 1010 Mar 1 18:24 setup
-rwxr-xr-x 1 root root 104 Mar 1 18:24 thrust2 Replies
Status changed to Awaiting User Response Railway • 14 days ago
sam-a
EMPLOYEE
12 days ago
This should be fixed. Let us know if you still have issues.
Status changed to Solved sam-a • 12 days ago
