Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chown: cannot access 'storage': No such file or directory #113

Closed
danwetherald opened this issue Aug 24, 2024 · 2 comments
Closed

chown: cannot access 'storage': No such file or directory #113

danwetherald opened this issue Aug 24, 2024 · 2 comments

Comments

@danwetherald
Copy link

#18 [stage-2 4/4] RUN groupadd --system --gid 1000 rails &&     useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash &&     chown -R 1000:1000 db log storage tmp
#18 0.202 chown: cannot access 'storage': No such file or directory
#18 ERROR: process "/bin/sh -c groupadd --system --gid 1000 rails &&     useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash &&     chown -R 1000:1000 db log storage tmp" did not complete successfully: exit code: 1
------
 > [stage-2 4/4] RUN groupadd --system --gid 1000 rails &&     useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash &&     chown -R 1000:1000 db log storage tmp:
0.202 chown: cannot access 'storage': No such file or directory

We are seeing issue when trying to deploy to fly from GH Actions - Why is the storage directory included in this generated line?

# Run and own only the runtime files as a non-root user for security
RUN groupadd --system --gid 1000 rails && \
    useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && \
    chown -R 1000:1000 db log storage tmp
@luizkowalski
Copy link
Collaborator

looks like storage is not being copied over. both your .gitignore and .dockerignore should contain these instructions:

/storage/*
!/storage/.keep

and your storage dir should have a .keep file

@luizkowalski
Copy link
Collaborator

I'm gonna go ahead and close this one, please reopen if the issue persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants