forked from brentley/ecsdemo-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
23 lines (18 loc) · 787 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ruby:2.5-slim
COPY Gemfile Gemfile.lock /usr/src/app/
WORKDIR /usr/src/app
RUN apt-get update && apt-get -y install curl jq libgmp3-dev ruby-dev build-essential libsqlite3-dev && \
bundle install && \
apt-get autoremove -y --purge && \
apt-get remove -y --auto-remove --purge ruby-dev libgmp3-dev build-essential libsqlite3-dev && \
apt-get clean && \
rm -rvf /root/* /root/.gem* /var/cache/*
COPY . /usr/src/app
RUN chmod +x /usr/src/app/startup.sh
# helpful when trying to update gems -> bundle update, remove the Gemfile.lock, start ruby
# RUN bundle update
# RUN rm -vf /usr/src/app/Gemfile.lock
HEALTHCHECK --interval=10s --timeout=3s \
CMD curl -f -s http://localhost:3000/health/ || exit 1
EXPOSE 3000
ENTRYPOINT ["bash","/usr/src/app/startup.sh"]