Skip to content

Commit

Permalink
Get containers working reliably
Browse files Browse the repository at this point in the history
Fix bundler issue in build, and getcwd error due to volumes (similar to
docker/for-mac#1509)
  • Loading branch information
Ariel Caplan committed Dec 30, 2020
1 parent c1484fd commit 550bb21
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ services:
- docker
before_install:
- bin/setup
- gem update bundler
- gem install -v 2.2 bundler -N
script:
- rake
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ruby:2.4.0
FROM ruby:2.6.6
RUN apt-get update -qq
RUN gem update bundler
ENV BUNDLER_VERSION=2.0.2
RUN gem update --system
RUN gem install -v 2.2.3 bundler -N
ENV BUNDLER_VERSION=2.2
RUN mkdir /simple_jsonapi_client
WORKDIR /simple_jsonapi_client
ADD . .
Expand Down
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ services:
jsonapi_app_spec:
build: ./spec/jsonapi_app
entrypoint: bin/wait_for_it db:5432 -t 30 --
volumes:
- ./spec/jsonapi_app:/jsonapi_app
- /jsonapi_app/tmp/
# volumes:
# - ./spec/jsonapi_app:/jsonapi_app
command: bundle exec rails s -p 3001 -b '0.0.0.0'
ports:
- "3001:3001"
Expand All @@ -40,9 +39,8 @@ services:
jsonapi_app_console:
build: ./spec/jsonapi_app
entrypoint: bin/wait_for_it db:5432 -t 30 --
volumes:
- ./spec/jsonapi_app:/jsonapi_app
- /jsonapi_app/tmp/
# volumes:
# - ./spec/jsonapi_app:/jsonapi_app
command: bundle exec rails s -p 3002 -b '0.0.0.0'
ports:
- "3002:3002"
Expand Down
1 change: 1 addition & 0 deletions spec/jsonapi_app/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/pids/server.pid
5 changes: 3 additions & 2 deletions spec/jsonapi_app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ruby:2.4.0
FROM ruby:2.6.6
RUN apt-get update -qq
RUN gem update bundler
RUN gem update --system
RUN gem install -v 2.2.3 bundler -N
RUN mkdir /jsonapi_app
WORKDIR /jsonapi_app
ADD Gemfile /jsonapi_app/Gemfile
Expand Down
2 changes: 1 addition & 1 deletion spec/jsonapi_app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@ DEPENDENCIES
rails (~> 5.0.1)

BUNDLED WITH
1.15.3
2.2.3

0 comments on commit 550bb21

Please sign in to comment.