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

feat(onpremise): Support custom CA roots in Docker image #27062

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ RUN sentry help | sed '1,/Commands:/d' | awk '{print $1}' > /sentry-commands.tx
COPY ./docker/sentry.conf.py ./docker/config.yml $SENTRY_CONF/
COPY ./docker/docker-entrypoint.sh /

ENV DEFAULT_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
ENV REQUESTS_CA_BUNDLE=$DEFAULT_CA_BUNDLE \
GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR=$DEFAULT_CA_BUNDLE

EXPOSE 9000
VOLUME /data

Expand Down
7 changes: 7 additions & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

if [ "$(ls -A /usr/local/share/ca-certificates/)" ]; then
echo "Found custom ca certificates, loading ..."
update-ca-certificates
else
echo "No custom ca certificates, skipping ..."
fi

# first check if we're passing flags, if so
# prepend with sentry
if [ "${1:0:1}" = '-' ]; then
Expand Down