SlideShare uma empresa Scribd logo
1 de 2
Como ajustar a acentuação portuguesa
em containers do Docker?
Sintomas:
 A acentuação portuguesa e os caracteres especiais
não são exibidos corretamente
 A criação de databases relacionais com a correta
interpretação da acentuação portuguesa ou de outros
caracteres especiais não é possível exibindo uma
mensagem de erro
 A inserção de documentos com caracteres especiais
em databases não relacionais não retornam operação
bem sucedida
Como verificar se o ajuste é necessário?
1. No docker acesse o container que está rodando
2. Com o “vi” crie um arquivo e insira acentuação
portuguesa. Grave o arquivo e abra-o novamente
verificando que a acentuação está sendo exibida
corretamente.
3. Execute o comando: locale
4. Verifique se as variáveis: LANG, LANGUAGE, LC_ALL
possuem valores.
Se os passos 2 e 4 não tiveram sucesso, o ajuste é
necessário.
Como ajustar?
Considerando que você já está “logado” no container,
execute os seguintes passos:
 apt-get –qq update
 apt-get install locales
 locale-gen pt_BR.UTF-8
 dpkg-reconfigure locales (escolher: pt_BR.ETF-8)
 echo 'export LANG="pt_BR.UTF-8"' >>
$HOME/.bashrc
 echo 'export LANGUAGE="pt_BR.UTF-8"' >>
$HOME/.bashrc
 echo 'export LC_ALL="pt_BR.UTF-8"' >>
$HOME/.bashrc
 update-locale LC_ALL=pt_BR.UTF-8
LANG=pt_BR.UTF-8 LANGUAGE=pt_BR.UTF-8
Faça um novo “logon” no container
 Repita o teste do item 2 acima
 execute o comando: locale
 Verifique se as variáveis: LANG, LANGUAGE, LC_ALL
estão com o valor: pt_BR.ETF-8
Se sim, o ajuste foi feito corretamente
Palavras chave:
Docker, Container, Locale, Linux, SQL, NoSQL,
pt_BR.ETF-8, acentuação
Marcos Aurelio Barranco – 05/12/2016

Mais conteúdo relacionado

Mais procurados

Modulus of subgrade reaction
Modulus of subgrade reaction Modulus of subgrade reaction
Modulus of subgrade reaction Abdelrahman Esam
 
Welding of steel bridges
Welding of steel bridgesWelding of steel bridges
Welding of steel bridgesGopi Nadh
 
Secant piled walls dsign - تصميم خوازيق الجدران الساندة - ميكرو بايل
Secant piled walls  dsign - تصميم خوازيق الجدران الساندة - ميكرو بايلSecant piled walls  dsign - تصميم خوازيق الجدران الساندة - ميكرو بايل
Secant piled walls dsign - تصميم خوازيق الجدران الساندة - ميكرو بايلDr.youssef hamida
 
Post tensioned slabs design fundamentals anas alakhras
Post tensioned slabs design fundamentals anas alakhrasPost tensioned slabs design fundamentals anas alakhras
Post tensioned slabs design fundamentals anas alakhrasAnass Alakhrass MSCEng,PMP,RMP
 
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)LoBner A-p
 
Sachpazis gabion retaining wall analysis & design bs8002-1994
Sachpazis gabion retaining wall analysis & design bs8002-1994Sachpazis gabion retaining wall analysis & design bs8002-1994
Sachpazis gabion retaining wall analysis & design bs8002-1994Dr.Costas Sachpazis
 
2-Analysis of Statically Determinate Structures.pdf
2-Analysis of Statically Determinate Structures.pdf2-Analysis of Statically Determinate Structures.pdf
2-Analysis of Statically Determinate Structures.pdfYusfarijerjis
 
LABORATORIO DE CONSOLIDACION
LABORATORIO DE CONSOLIDACIONLABORATORIO DE CONSOLIDACION
LABORATORIO DE CONSOLIDACIONARGYN GO
 
geotechnical failures of dam
geotechnical failures of damgeotechnical failures of dam
geotechnical failures of damsanthosh2121
 
Retrofitting of RC Beam Column Joint
Retrofitting of RC Beam Column JointRetrofitting of RC Beam Column Joint
Retrofitting of RC Beam Column JointDishamk
 
Integrating FIDO Authentication & Federation Protocols
Integrating FIDO Authentication & Federation ProtocolsIntegrating FIDO Authentication & Federation Protocols
Integrating FIDO Authentication & Federation ProtocolsFIDO Alliance
 
Ct2 Precast concrete piles
Ct2 Precast concrete pilesCt2 Precast concrete piles
Ct2 Precast concrete pilesSze Ting Kuek
 
Conference paper subgrade reaction
Conference paper subgrade reactionConference paper subgrade reaction
Conference paper subgrade reactionabdulhakim mawas
 
Precast pretensioned concrete girders
Precast pretensioned concrete girdersPrecast pretensioned concrete girders
Precast pretensioned concrete girdersMD.Yeasin Mostafiz
 
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]Muhammad Irfan
 

Mais procurados (19)

Modulus of subgrade reaction
Modulus of subgrade reaction Modulus of subgrade reaction
Modulus of subgrade reaction
 
Welding of steel bridges
Welding of steel bridgesWelding of steel bridges
Welding of steel bridges
 
09 grupo de pilotes
09 grupo de pilotes09 grupo de pilotes
09 grupo de pilotes
 
Secant piled walls dsign - تصميم خوازيق الجدران الساندة - ميكرو بايل
Secant piled walls  dsign - تصميم خوازيق الجدران الساندة - ميكرو بايلSecant piled walls  dsign - تصميم خوازيق الجدران الساندة - ميكرو بايل
Secant piled walls dsign - تصميم خوازيق الجدران الساندة - ميكرو بايل
 
Post tensioned slabs design fundamentals anas alakhras
Post tensioned slabs design fundamentals anas alakhrasPost tensioned slabs design fundamentals anas alakhras
Post tensioned slabs design fundamentals anas alakhras
 
Lateral loads manual
Lateral loads manualLateral loads manual
Lateral loads manual
 
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)
109982581 catalogo-piezas-keeway-tx-txm-200-cc (1)
 
Strut and Tie Model for Pile Cap
Strut and Tie Model for Pile CapStrut and Tie Model for Pile Cap
Strut and Tie Model for Pile Cap
 
Sachpazis gabion retaining wall analysis & design bs8002-1994
Sachpazis gabion retaining wall analysis & design bs8002-1994Sachpazis gabion retaining wall analysis & design bs8002-1994
Sachpazis gabion retaining wall analysis & design bs8002-1994
 
2-Analysis of Statically Determinate Structures.pdf
2-Analysis of Statically Determinate Structures.pdf2-Analysis of Statically Determinate Structures.pdf
2-Analysis of Statically Determinate Structures.pdf
 
LABORATORIO DE CONSOLIDACION
LABORATORIO DE CONSOLIDACIONLABORATORIO DE CONSOLIDACION
LABORATORIO DE CONSOLIDACION
 
geotechnical failures of dam
geotechnical failures of damgeotechnical failures of dam
geotechnical failures of dam
 
Retrofitting of RC Beam Column Joint
Retrofitting of RC Beam Column JointRetrofitting of RC Beam Column Joint
Retrofitting of RC Beam Column Joint
 
Integrating FIDO Authentication & Federation Protocols
Integrating FIDO Authentication & Federation ProtocolsIntegrating FIDO Authentication & Federation Protocols
Integrating FIDO Authentication & Federation Protocols
 
Ct2 Precast concrete piles
Ct2 Precast concrete pilesCt2 Precast concrete piles
Ct2 Precast concrete piles
 
Conference paper subgrade reaction
Conference paper subgrade reactionConference paper subgrade reaction
Conference paper subgrade reaction
 
Precast pretensioned concrete girders
Precast pretensioned concrete girdersPrecast pretensioned concrete girders
Precast pretensioned concrete girders
 
Cimentacion fundaciones
Cimentacion fundacionesCimentacion fundaciones
Cimentacion fundaciones
 
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]
Geotechnical Engineering-II [Lec #15 & 16: Schmertmann Method]
 

Destaque

EBzão Infinite - A importância da AIESEC entregar liderança para o Brasil
EBzão Infinite - A importância da AIESEC entregar liderança para o BrasilEBzão Infinite - A importância da AIESEC entregar liderança para o Brasil
EBzão Infinite - A importância da AIESEC entregar liderança para o BrasilHermano Reis
 
¿Cómo seremos al resucitar?
¿Cómo seremos al resucitar?¿Cómo seremos al resucitar?
¿Cómo seremos al resucitar?agufab
 
Fotografía Muñoz Maini
Fotografía Muñoz MainiFotografía Muñoz Maini
Fotografía Muñoz Mainimicaela muñoz
 
Fast stat power point - 1000
Fast stat power point - 1000Fast stat power point - 1000
Fast stat power point - 1000Greg Bauer
 

Destaque (10)

HP 12C WIFI
HP 12C WIFIHP 12C WIFI
HP 12C WIFI
 
EBzão Infinite - A importância da AIESEC entregar liderança para o Brasil
EBzão Infinite - A importância da AIESEC entregar liderança para o BrasilEBzão Infinite - A importância da AIESEC entregar liderança para o Brasil
EBzão Infinite - A importância da AIESEC entregar liderança para o Brasil
 
¿Cómo seremos al resucitar?
¿Cómo seremos al resucitar?¿Cómo seremos al resucitar?
¿Cómo seremos al resucitar?
 
Cuaderno online
Cuaderno onlineCuaderno online
Cuaderno online
 
Otoño precioso
Otoño preciosoOtoño precioso
Otoño precioso
 
Fotografía Muñoz Maini
Fotografía Muñoz MainiFotografía Muñoz Maini
Fotografía Muñoz Maini
 
CV
CVCV
CV
 
Minibatt
MinibattMinibatt
Minibatt
 
Minibatt
Minibatt Minibatt
Minibatt
 
Fast stat power point - 1000
Fast stat power point - 1000Fast stat power point - 1000
Fast stat power point - 1000
 

Como ajustar a acentuação portuguesa em containers do docker

  • 1. Como ajustar a acentuação portuguesa em containers do Docker? Sintomas:  A acentuação portuguesa e os caracteres especiais não são exibidos corretamente  A criação de databases relacionais com a correta interpretação da acentuação portuguesa ou de outros caracteres especiais não é possível exibindo uma mensagem de erro  A inserção de documentos com caracteres especiais em databases não relacionais não retornam operação bem sucedida Como verificar se o ajuste é necessário? 1. No docker acesse o container que está rodando 2. Com o “vi” crie um arquivo e insira acentuação portuguesa. Grave o arquivo e abra-o novamente verificando que a acentuação está sendo exibida corretamente. 3. Execute o comando: locale 4. Verifique se as variáveis: LANG, LANGUAGE, LC_ALL possuem valores. Se os passos 2 e 4 não tiveram sucesso, o ajuste é necessário.
  • 2. Como ajustar? Considerando que você já está “logado” no container, execute os seguintes passos:  apt-get –qq update  apt-get install locales  locale-gen pt_BR.UTF-8  dpkg-reconfigure locales (escolher: pt_BR.ETF-8)  echo 'export LANG="pt_BR.UTF-8"' >> $HOME/.bashrc  echo 'export LANGUAGE="pt_BR.UTF-8"' >> $HOME/.bashrc  echo 'export LC_ALL="pt_BR.UTF-8"' >> $HOME/.bashrc  update-locale LC_ALL=pt_BR.UTF-8 LANG=pt_BR.UTF-8 LANGUAGE=pt_BR.UTF-8 Faça um novo “logon” no container  Repita o teste do item 2 acima  execute o comando: locale  Verifique se as variáveis: LANG, LANGUAGE, LC_ALL estão com o valor: pt_BR.ETF-8 Se sim, o ajuste foi feito corretamente Palavras chave: Docker, Container, Locale, Linux, SQL, NoSQL, pt_BR.ETF-8, acentuação Marcos Aurelio Barranco – 05/12/2016