diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 937450997..c74ee3297 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,8 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: ${{ github.ref_name == 'main' }} + cache-from: type=gha + cache-to: type=gha,mode=max tags: | ${{ steps.get-tag-latest.outputs.tags }} ${{ steps.get-tag-sha.outputs.tags }} diff --git a/Dockerfile b/Dockerfile index 72e4f3fc3..3a786963a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,6 @@ EXPOSE 8080 SHELL ["/bin/bash", "-c"] -WORKDIR /app -ADD Gemfile Gemfile.lock /app/ -RUN gem install bundler:$BUNDLER_VERSION && bundle install - RUN apt-get update \ && apt-get install -y --no-install-recommends \ supervisor locales nodejs vim nano \ @@ -39,6 +35,10 @@ RUN curl -fsSLO "$SUPERCRONIC_URL" \ && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic +WORKDIR /app +ADD Gemfile Gemfile.lock /app/ +RUN gem install bundler:$BUNDLER_VERSION && bundle install + ADD docker/supervisord.conf /etc/supervisord.conf ADD docker/start.sh /app/ ADD . /app