Docker and Locales

Since I rebuilt my server I have been seeing issues where my use of the transcode-video docker image would consistently fail to complete the encoding process with this error.

transcode-video: invalid byte sequence in US-ASCII

The linked post led me to the solution - I needed to update the Dockerfile for my version of the image to include additional commands to configure the locale. This was a pretty easy addition as I already was using my own to customise a couple of things. I do not know why the appeared, but all I really care about is that it is working again now.

FROM ntodd/video-transcoding
  
# Configure locale
RUN locale-gen en_GB.UTF-8
ENV LANG en_GB.UTF-8
ENV LANGUAGE en_GB:en
ENV LC_ALL en_GB.UTF-8