I posted the following article the other day and introduced the Dockerfile that builds an environment where R and Python can be used.
The Dockerfile in this article had the following problems.
Therefore, I modified the Dockerfile to solve the above problem by changing the locale.
FROM ubuntu:18.04 # set timezone RUN apt-get update \ && apt-get install tzdata \ && ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime RUN date # install packages RUN ["/bin/bash", "-c", "\ apt-get update \ && apt-get install -y \ vim \ build-essential \ git curl llvm sqlite3 libssl-dev libbz2-dev \ libreadline-dev libsqlite3-dev libncurses5-dev \ libncursesw5-dev python-tk python3-tk tk-dev aria2 \ lsb-release locales\ "] RUN locale-gen ja_JP.UTF-8 ENV LANG ja_JP.UTF-8 ENV LANGUAGE ja_JP:ja ENV LC_ALL ja_JP.UTF-8 RUN ["/bin/bash", "-c", "apt-get install -y software-properties-common"] RUN apt-add-repository ppa:ansible/ansible -y # install r RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 #RUN add-apt-repository 'deb https://cran.rstudio.com/bin/linux/ubuntu $(lsb_release -cs)-cran35/' RUN add-apt-repository 'deb https://cran.rstudio.com/bin/linux/ubuntu bionic-cran35/' RUN ["/bin/bash", "-c", "\ apt-get update \ && apt-get install -y r-base \ "] RUN Rscript --version CMD ["/bin/bash", "-c"]
The differences are as follows.
--I stopped installing python3.8 python3-pip --Added locales to the package to install --A block starting with locale-gen, set to Japanese
that's all. I am creating a script to build pyenv on the container, and if I can do this, I think that I can create an environment that can be reproduced even if I change the PC for the time being. I will write an article again when the script is completed.