Skip to content

Commit 1a2b8cf

Browse files
committed
Fixed- You must use Bundler 2 or greater with this lockfile. RUN gem update --system
1 parent 921ef67 commit 1a2b8cf

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

Diff for: Dockerfile

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
FROM ruby:2.6.0
2-
32
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
43
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
54
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
@@ -9,5 +8,15 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
98
RUN mkdir /myapp
109
WORKDIR /myapp
1110
COPY . /myapp
11+
RUN gem update --system
1212
RUN bundle install
1313
RUN yarn install --check-files
14+
15+
# Add a script to be executed every time the container starts.
16+
COPY entrypoint.sh /usr/bin/
17+
RUN chmod +x /usr/bin/entrypoint.sh
18+
ENTRYPOINT ["entrypoint.sh"]
19+
EXPOSE 3000
20+
21+
# Start the main process.
22+
CMD ["rails", "server", "-b", "0.0.0.0"]

Diff for: docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
db:
44
image: postgres:10.10
55
volumes:
6-
- pgdata:/var/lib/postgresql/data
6+
- ./tmp/db:/var/lib/postgresql/data
77
ports:
88
- "5433:5432"
99
web:

Diff for: entrypoint.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Remove a potentially pre-existing server.pid for Rails.
5+
rm -f /myapp/tmp/pids/server.pid
6+
7+
# Then exec the container's main process (what's set as CMD in the Dockerfile).
8+
exec "$@"

0 commit comments

Comments
 (0)