Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:
- name: Run Spec Tests
run: bundle exec rake spec
publish:
needs:
- test
if: ${{ (!github.event.pull_request) && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/deploy/') || startsWith(github.ref, 'refs/heads/build/')) }}
runs-on: ubuntu-latest
env:
Expand Down
22 changes: 17 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ ENV BUILD_DEPS="build-essential libpq-dev libsqlite3-dev tzdata locales git curl
RUN useradd -m -U app && \
su -s /bin/bash -c "mkdir -p /home/app" app

RUN sed -i '/stretch-updates/d' /etc/apt/sources.list && \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \
sed -i 's|http://security.debian.org|http://archive.debian.org|g' /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until

RUN apt-get update -qq && \
apt-get install -y $BUILD_DEPS --no-install-recommends

Expand All @@ -40,8 +45,9 @@ RUN \
unzip -o /tmp/fits-${FITS_VERSION}.zip && \
\
# Update bundler
gem update --system && \
gem update bundler
gem install rubygems-update --version 3.3.24 && \
update_rubygems && \
gem install bundler --version 2.3.8

USER app
WORKDIR /home/app
Expand Down Expand Up @@ -73,6 +79,11 @@ ENV RUNTIME_DEPS="imagemagick libexif12 libexpat1 libgif7 glib-2.0 libgsf-1-114
LANG="en_US.UTF-8" \
FITS_VERSION="1.0.5"

RUN sed -i '/stretch-updates/d' /etc/apt/sources.list && \
sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \
sed -i 's|http://security.debian.org|http://archive.debian.org|g' /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid-until

RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 && \
apt-get update -qq && \
apt-get install -y curl gnupg2 --no-install-recommends && \
Expand Down Expand Up @@ -103,8 +114,9 @@ RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/*.deb && \
# Update Bundler
gem update --system && \
gem update bundler
gem install rubygems-update --version 3.3.24 && \
update_rubygems && \
gem install bundler --version 2.3.8

COPY --from=base /tmp/stage/bin/* /usr/local/bin/
COPY --from=base /tmp/stage/fits-${FITS_VERSION} /usr/local/fits
Expand All @@ -122,5 +134,5 @@ RUN bundle config set path 'vendor/gems' && \

EXPOSE 3000
ENV PATH="/home/app/bin:${PATH}"
CMD bin/boot_container
CMD bundle exec bin/boot_container
HEALTHCHECK --start-period=60s CMD curl -f http://localhost:3000/
Loading
Loading