Docker Community Forums

Share and learn in the Docker community.

Can't write ñ, ä, ë, ü in a ubuntu container


(Jersy96) #1

I need to be able to write ñ, ä, ë, ü in the console of an ubuntu docker container. I created the image which I create the container from with the following dockerfile:

FROM ubuntu:17.10
RUN apt-get update -y
RUN apt-get install locales
RUN locale-gen es_CO.UTF-8 
ENV LANG es_CO.UTF-8 
ENV LANGUAGE es_CO:es 
ENV LC_ALL es_CO.UTF-8

If I run a python script like this:

print("ñ")
the ñ is printed in the console normally, the problem is when I try to write the letter ñ as an input of a a program, when I type ñ in the keyboard what shows up in the console is ¤. I have already tried to reconfigure the keyboard with setxkbmap but I get an error that says: ‘Cannot open display “default display”’.

I also have tried to find a docker ubuntu images with this settings already setted but I have not finded any one. Please help.