Skip to content

Commit

Permalink
Improve docker setup
Browse files Browse the repository at this point in the history
  • Loading branch information
waiting-for-dev committed Feb 14, 2021
1 parent 71d1d61 commit b2aa297
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM ruby:2.4.0
ENV APP_HOME /app/
ENV LIB_DIR lib/front_matter_parser/
RUN mkdir -p $APP_HOME/$LIB_DIR
WORKDIR $APP_HOME
COPY Gemfile *gemspec $APP_HOME
COPY $LIB_DIR/version.rb $APP_HOME/$LIB_DIR
RUN bundle install
FROM ruby:3.0.0
ENV APP_USER front_matter_parser_user
RUN useradd -ms /bin/bash $APP_USER
USER $APP_USER
WORKDIR /home/$APP_USER/app
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ version: '2'
services:
app:
build: .
command: tail -f Gemfile
image: front_matter_parser_user
command: bash -c "bundle && tail -f Gemfile"
volumes:
- .:/app
- .:/home/front_matter_parser_user/app
tty: true
stdin_open: true
tmpfs:
- /tmp

0 comments on commit b2aa297

Please sign in to comment.