Skip to content

Commit

Permalink
Update CA certificates across all stages in Dockerfiles to resolve SS…
Browse files Browse the repository at this point in the history
…L verification issues
  • Loading branch information
nomadbitcoin committed Oct 23, 2024
1 parent 2ccfb05 commit 147e261
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
22 changes: 22 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ FROM base as builder

USER root

# Atualizar certificados CA
RUN update-ca-trust force-enable && \
dnf install -y ca-certificates && \
update-ca-trust extract

RUN curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo && \
dnf install --setopt install_weak_deps=false -y \
ImageMagick iproute jemalloc less libcurl libcurl-devel \
Expand Down Expand Up @@ -57,6 +62,11 @@ FROM base as production

USER root

# Atualizar certificados CA
RUN update-ca-trust force-enable && \
dnf install -y ca-certificates && \
update-ca-trust extract

RUN dnf install --setopt install_weak_deps=false -y bash curl ImageMagick \
iproute jemalloc less libcurl \
postgresql tzdata nodejs libpq \
Expand Down Expand Up @@ -88,6 +98,11 @@ FROM builder AS testing

USER root

# Atualizar certificados CA
RUN update-ca-trust force-enable && \
dnf install -y ca-certificates && \
update-ca-trust extract

RUN dnf install --setopt install_weak_deps=false -y \
chromium-headless chromedriver && \
yum clean all && \
Expand All @@ -113,6 +128,13 @@ CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p", "3000"]
## Development
FROM builder AS development

USER root

# Atualizar certificados CA
RUN update-ca-trust force-enable && \
dnf install -y ca-certificates && \
update-ca-trust extract

COPY --chown="${APP_USER}":"${APP_USER}" ./spec "${APP_HOME}"/spec
COPY --from=builder /usr/local/bin/dockerize /usr/local/bin/dockerize

Expand Down
1 change: 0 additions & 1 deletion config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def not_past_scheduled_time?(current_time)
# On Heroku this configuration is overridden and Sidekiq will point at the redis
# instance given by the ENV variable REDIS_PROVIDER
config.redis = { url: sidekiq_url }
config.options[:service_name] = ENV['SERVICE_NAME'] || 'default_service_name'

config.server_middleware do |chain|
chain.add Sidekiq::HoneycombMiddleware
Expand Down

0 comments on commit 147e261

Please sign in to comment.