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

GIT-2927: Fixed lack of updates to trusted CA lists (Fixes #2927) #3006

Merged
merged 2 commits into from
Dec 17, 2021
Merged
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
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,13 @@ ENV VERSION_CODE=$version_code

# Set executable permission to start file
RUN chmod +x bin/start

# FIXME / to remove / https://github.com/nahi/httpclient/issues/445
RUN cat /etc/ssl/certs/ca-certificates.crt \
>/usr/src/app/vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/lib/httpclient/cacert.pem

# Update HTTPClient cacert.pem with the latest Mozilla cacert.pem
RUN wget https://curl.se/ca/cacert.pem https://curl.se/ca/cacert.pem.sha256 -P /tmp
RUN cd /tmp && sha256sum cacert.pem > cacert.pem.sha256sum && cd ${RAILS_ROOT}
RUN diff /tmp/cacert.pem.sha256sum /tmp/cacert.pem.sha256
RUN mv -v /tmp/cacert.pem $(bundle info httpclient --path)/lib/httpclient/ && rm -v /tmp/cacert*

# Update Openssl certs [This is for Faraday adapter for Net::HTTP]
RUN [[ $(id -u) -eq 0 ]] && update-ca-certificates
# Start the application.
CMD ["bin/start"]