# 使用Docker架設GeoServer Part2 ## 中文資料夾、檔案無法顯示   ## 解決方式 1. 撰寫DockerFile,安裝&設定中文語系 ``` # 指定Image來源 FROM docker.osgeo.org/geoserver:2.21.2 # Set the locale RUN apt-get clean && apt-get update && apt-get install -y locales RUN sed -ie 's/# zh_TW.UTF-8 UTF-8/zh_TW.UTF-8 UTF-8/g' /etc/locale.gen RUN locale-gen ENV LANG zh_TW.UTF-8 ``` 2. 透過docker build 指令讀取 Dockerfiles 並建立 Image ``` docker build -t docker.osgeo.org/geoserver:2.21.2 -f D:\docker\font\Dockerfile . ```  3. 啟動Container ``` docker start d3f59b67164b5be0d1bdb53c351de5c4a2df3b713849699ee5bd29d6cbbe2158 d3f59b67164b5be0d1bdb53c351de5c4a2df3b713849699ee5bd29d6cbbe2158 ``` OR  4. 開啟GeoServer確認是否可以正常顯示中文檔案  --- [參考資料1](https://blog.llcat.tech/2018/12/03/add-zh-CN-locales-and-fonts-in-docker-images/) [參考資料2](https://ithelp.ithome.com.tw/articles/10133125)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up