Skip to content

Instantly share code, notes, and snippets.

@garthk
Created January 19, 2014 23:44
Show Gist options
  • Save garthk/8512576 to your computer and use it in GitHub Desktop.
Save garthk/8512576 to your computer and use it in GitHub Desktop.
Avoiding Java certificate problems with `stackbrew/ubuntu` under Docker
FROM stackbrew/ubuntu:precise
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
@garthk
Copy link
Author

garthk commented Jan 19, 2014

When installing openjdk-6-jre or similar under the minimal Docker image stackbrew/ubuntu:precise, you'll see errors installing certificates with non-ASCII characters in their names:

Setting up ca-certificates-java (20110912ubuntu6) ...
Adding debian:spi-cacert-2008.pem
Warning: there was a problem reading the certificate file /etc/ssl/certs/Certinomis_-_Autorit??_Racine.pem. Message:
Adding debian:TC_TrustCenter_Class_2_CA_II.pem
Adding debian:DST_Root_CA_X3.pem
Adding debian:Verisign_Class_2_Public_Primary_Certification_Authority_-_G2.pem
Adding debian:NetLock_Notary_=Class_A=_Root.pem
Warning: there was a problem reading the certificate file /etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem. Message:
  /etc/ssl/certs/EBG_Elektronik_Sertifika_Hizmet_Sa??lay??c??s??.pem (No such file or directory)

… and so on, with two other failures at the time of writing.

The root cause is that the image lacks a useful locale setting. Running locale-gen and setting LANG fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment