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: HTTPS option in docker build #179

Merged
merged 2 commits into from
Jul 27, 2024

Conversation

zohassadar
Copy link
Contributor

Will create self signed certificate if the HTTPS environment variable isn't null and add the TLS_KEY & TLS_CERT variables to the container.

If HTTPS is not set, the build script & Dockerfile maintain original behavior.

Copy link
Owner

@timotheeg timotheeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just noting; I had issues with OBS refusing to load content over a self-signed certificate.

For the raspberry pi setup, the setup script outputs the certificate fingerprint, so it can supplied to OBS as trusted:

https://github.com/timotheeg/nestrischamps/blob/main/setup/local_rpi/setup.sh#L135-L143

# generate public key fingerprint to tell OBS we trust the server
PUB_KEY_FINGERPRINT=$(openssl x509 -in ${TLS_CERT_PATH} -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64)

echo
echo ========== IMPORTANT ==========
echo
echo "Start OBS at the command line with this argument:"
echo "--ignore-certificate-errors-spki-list=${PUB_KEY_FINGERPRINT}"

@timotheeg timotheeg merged commit 5862287 into timotheeg:main Jul 27, 2024
1 check passed
@zohassadar zohassadar deleted the docker-https-option branch July 27, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants