File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,10 @@ RUN apt-get update -qq && apt-get install -y nodejs && npm install -g yarn
19
19
WORKDIR /rails
20
20
21
21
# Ensure gems are installed on a persistent volume and available as bins
22
+ # Make the folder world writable to let the default user install the gems
23
+ RUN mkdir /bundle && chmod -R ugo+rwt /bundle
22
24
VOLUME /bundle
23
- RUN bundle config set --global path '/bundle'
25
+ ENV BUNDLE_PATH= '/bundle'
24
26
ENV PATH="/bundle/ruby/$RUBY_VERSION/bin:${PATH}"
25
27
26
28
# Install Rails
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Install [Docker](https://www.docker.com/products/docker-desktop/) (and [WSL](htt
6
6
7
7
``` bash
8
8
docker volume create ruby-bundle-cache
9
- alias docked=' docker run --rm -it -v ${PWD}:/rails -v ruby-bundle-cache:/bundle -p 3000:3000 ghcr.io/rails/cli'
9
+ alias docked=' docker run --rm -it -v ${PWD}:/rails -u $(id -u):$(id -g) - v ruby-bundle-cache:/bundle -p 3000:3000 ghcr.io/rails/cli'
10
10
```
11
11
12
12
Then create your Rails app:
You can’t perform that action at this time.
0 commit comments