-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows to run the blog application within a docker container.
- Loading branch information
1 parent
b1479f1
commit fe860ca
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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,19 @@ | ||
FROM ruby:latest | ||
|
||
# Create and switch to a user called app | ||
RUN useradd --create-home --shell /bin/bash blog | ||
|
||
WORKDIR /home/blog | ||
|
||
# copy gemfile separately to cache step before more frequent code changes :) | ||
COPY Gemfile Gemfile.lock /home/blog/ | ||
RUN bundle install | ||
|
||
ADD . /home/blog | ||
RUN chown --recursive blog:blog /home/blog | ||
|
||
USER blog | ||
|
||
EXPOSE 4567 | ||
|
||
ENTRYPOINT ["bundle","exec"] |
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