locale.setlocale(locale.LC_CTYPE, 'chinese')
↑ 虽然忘记为什么要写这句了。。实际注释掉好像没什么影响。
如果确实需要的话,Dockerfile 内要怎么配置?
ARG PYTHON_IMAGE_VERSION=3
FROM python:$PYTHON_IMAGE_VERSION
RUN pip install --upgrade pip \
&& pip install pipenv \
&& python --version ; pip --version ; pipenv --version
COPY entrypoint.sh /
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Markdown-To-Z-Blog/api.py at main · wdssmq/Markdown-To-Z-Blog
https://github.com/wdssmq/Markdown-To-Z-Blog/blob/main/api.py
action-pipenv/Dockerfile at master · VaultVulp/action-pipenv
https://github.com/VaultVulp/action-pipenv/blob/master/Dockerfile
1
julyclyde 2022-02-25 11:25:44 +08:00
locale-gen 还是 localedef 来着……
|
2
qq296015668 2022-02-27 08:04:26 +08:00
这怎么看起来是 python 语法?
ARG PYTHON_IMAGE_VERSION=3 FROM python:$PYTHON_IMAGE_VERSION RUN pip install --upgrade pip \ && pip install pipenv \ && python --version ; pip --version ; pipenv --version \ && python -c "import locale; locale.setlocale(locale.LC_CTYPE, 'chinese')" COPY entrypoint.sh / RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] 测试了下,这条命令报错。你自己检查下 |