forked from brentley/ecsdemo-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (21 loc) · 943 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
24
25
26
# FROM ruby:2.5-slim
FROM public.ecr.aws/bitnami/ruby:2.5
COPY Gemfile Gemfile.lock /usr/src/app/
WORKDIR /usr/src/app
RUN apt-get update && apt-get -y install iproute2 curl jq libgmp3-dev ruby-dev build-essential sqlite libsqlite3-dev python3 python3-pip && \
gem install bundler:1.17.3 && \
bundle install && \
pip3 install awscli netaddr && \
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-cdk.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-cdk.sh"]