Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baseimage with gems preinstalled #847

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
5 changes: 2 additions & 3 deletions .github/workflows/build_deploy_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ jobs:

- name: Build rails image
env:
PASSWORD: ${{ secrets.GHCR }}
KEY_BASE: ${{ secrets.KEY_BASE}}
run: |
echo $PASSWORD | docker login ghcr.io -u eisbot --password-stdin
docker build -t $TAG --build-arg RAILS_ENV=staging --build-arg SECRET_KEY_BASE="$KEY_BASE" -f Dockerfile.generic .

- name: Build static content image
env:
PASSWORD: ${{ secrets.GHCR }}
run: |
echo $PASSWORD | docker login ghcr.io -u eisbot --password-stdin
docker create -ti --name rails $TAG bash
docker cp rails:/opt/webapps/app/public/ ./public/
docker build -t $STATIC_TAG -f Dockerfile.generic-static .
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.generic
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM internetee/ruby_base:3.0
FROM ghcr.io/internetee/auction_center:gems-latest
LABEL org.opencontainers.image.source=https://github.com/internetee/auction_center
ARG RAILS_ENV
ARG SECRET_KEY_BASE
Expand All @@ -7,8 +7,8 @@ ENV RAILS_ENV "$RAILS_ENV"
ENV SECRET_KEY_BASE "$SECRET_KEY_BASE"


COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle config set without 'development test' && bundle install --jobs 20 --retry 5
# COPY Gemfile Gemfile.lock ./
# RUN gem install bundler && bundle config set without 'development test' && bundle install --jobs 20 --retry 5
RUN yarn install --check-files

COPY . .
Expand Down