-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate the Rails application with the same user as the caller
Read the user id and group id of the caller and pass them to the Docker so the generate folders are with the same user as the caller. Fixes #4.
- Loading branch information
1 parent
57af0ab
commit 8901a75
Showing
6 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
ARG RUBY_VERSION=3.2.3 | ||
FROM ruby:${RUBY_VERSION} | ||
ARG USER_ID=1000 | ||
ARG GROUP_ID=1000 | ||
RUN groupadd -g $GROUP_ID app && useradd -u $USER_ID -g app -m app | ||
USER app | ||
ARG RAILS_VERSION | ||
# Install Rails based on the version specified but if not specified, install the latest version. | ||
RUN if [ -z "$RAILS_VERSION" ] ; then gem install rails ; else gem install rails -v $RAILS_VERSION ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARG RUBY_VERSION=3.2.3 | ||
FROM ruby:${RUBY_VERSION} | ||
ARG RAILS_VERSION | ||
# Install Rails based on the version specified but if not specified, install the latest version. | ||
RUN if [ -z "$RAILS_VERSION" ] ; then gem install rails ; else gem install rails -v $RAILS_VERSION ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters