-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 791 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 791 Bytes
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
27
28
29
30
31
FROM ruby:3.4.9-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
build-essential \
libyaml-dev && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 frankfurter
RUN mkdir /app && chown frankfurter:frankfurter /app
WORKDIR /app
COPY --chown=frankfurter:frankfurter Gemfile Gemfile.lock mise.toml ./
RUN gem install bundler && \
bundle config set --local deployment 'true' && \
bundle config set --local without 'development test' && \
bundle install
COPY --chown=frankfurter:frankfurter . .
ENV APP_ENV=production
USER frankfurter
HEALTHCHECK --interval=2s --timeout=4s --start-period=3s --retries=15 \
CMD curl -f "http://localhost:8080" || exit 1
CMD ["bundle", "exec", "unicorn", "-c", "./config/unicorn.rb"]