frankfurter/Dockerfile
BadMark d0a43e357a
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / publish (push) Has been cancelled
CI/CD Pipeline / release (push) Has been cancelled
up
2026-05-21 01:38:14 -06:00

32 lines
831 B
Docker

FROM ruby:4.0.4-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
ENV PORT=8080
USER frankfurter
HEALTHCHECK --interval=2s --timeout=4s --start-period=3s --retries=15 \
CMD curl -f "http://localhost:${PORT:-8080}" || exit 1
CMD ["sh", "-c", "bundle exec rake db:setup && exec bundle exec foreman start"]